Skip to content

Fix typing mode handling in transmute checks and rustc_dump_layout - #160125

Merged
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
bit-aloo:2026-07-29-next-solver-typing-bugs
Jul 31, 2026
Merged

Fix typing mode handling in transmute checks and rustc_dump_layout#160125
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
bit-aloo:2026-07-29-next-solver-typing-bugs

Conversation

@bit-aloo

Copy link
Copy Markdown
Member

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 29, 2026
@rustbot

rustbot commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

adwinwhite is currently at their maximum review capacity.
They may take a while to respond.

@rust-cloud-vms
rust-cloud-vms Bot force-pushed the 2026-07-29-next-solver-typing-bugs branch from d67cb2c to 6c348ec Compare July 29, 2026 08:56

@adwinwhite adwinwhite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

r=me after nits and squashing commits :>

View changes since this review

Comment thread compiler/rustc_hir_typeck/src/intrinsicck.rs Outdated
Comment thread tests/ui/traits/next-solver/opaques/transmute-async-fn-return-type.rs Outdated
Comment thread tests/ui/traits/next-solver/opaques/wrong-typing-mode-ice-3.rs Outdated
Comment thread tests/ui/traits/next-solver/opaques/wrong-typing-mode-ice-3.rs Outdated
@adwinwhite

Copy link
Copy Markdown
Contributor

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 29, 2026
Types obtained from typeck_results may contain aliases marked as rigid for
their original typing environment. Make these aliases non-rigid before
normalizing transmute types in TypingMode::Codegen.

Also use TypingMode::Codegen in rustc_dump_layout, since opaque types may
normalize to coroutines whose layouts cannot be computed in PostAnalysis mode.

Add regression coverage for both cases.
@rust-cloud-vms
rust-cloud-vms Bot force-pushed the 2026-07-29-next-solver-typing-bugs branch from 6c348ec to 9d94e8a Compare July 30, 2026 09:26
@bit-aloo bit-aloo changed the title Fix ICEs when checking layouts of opaque async return types Fix typing mode handling in transmute checks and rustc_dump_layout Jul 30, 2026
@bit-aloo

Copy link
Copy Markdown
Member Author

@adwinwhite I might need delegate to push to bors.

Comment thread tests/ui/traits/next-solver/opaques/dump-layout-opaque-coroutine.rs
@adwinwhite

This comment was marked as outdated.

@rust-bors

This comment was marked as outdated.

@adwinwhite

Copy link
Copy Markdown
Contributor

One last nit :>
@bors delegate+

@rust-bors

rust-bors Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

✌️ @bit-aloo, you can now approve this pull request!

If @adwinwhite told you to "r=me" after making some further change, then please make that change and post @bors r=adwinwhite.

View changes since this delegation.

@bit-aloo

Copy link
Copy Markdown
Member Author

@bors r=adwinwhite

@rust-bors

rust-bors Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

📌 Commit a67d71d has been approved by adwinwhite

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 30, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 30, 2026
…ping-bugs, r=adwinwhite

Fix typing mode handling in transmute checks and rustc_dump_layout

closes: rust-lang/trait-system-refactor-initiative#283

r? @adwinwhite

cc: @lcnr
rust-bors Bot pushed a commit that referenced this pull request Jul 30, 2026
Rollup of 14 pull requests

Successful merges:

 - #159817 (Rename splat to avoid stable name collisions)
 - #160204 (Sync from portable simd 2026 07 30)
 - #150885 (Revive L4Re target)
 - #158057 (Don't escape U+FF9E and U+FF9F in `escape_debug_ext`)
 - #160125 (Fix typing mode handling in transmute checks and rustc_dump_layout)
 - #160152 (Create on-demand CI job for testing EC2 instances)
 - #159214 (std: improve the documentation of the random feature)
 - #159818 (Resolve vars before calling `unnormalized_obligations`)
 - #160040 (Split function parsing out of `item.rs` to a new module.)
 - #160044 (Add regression tests for fixed dead-code issues)
 - #160144 (renovate: group lockfiles PRs)
 - #160149 (Fix Windows on Arm PAC default)
 - #160175 (Try to recover less from incorrectly parsed const arg)
 - #160181 (Mark `Tuple` and `FnPtr` traits `#[fundamental]`)
rust-bors Bot pushed a commit that referenced this pull request Jul 31, 2026
…uwer

Rollup of 25 pull requests

Successful merges:

 - #160204 (Sync from portable simd 2026 07 30)
 - #138230 (Add `raw_borrows_via_references` lint)
 - #158057 (Don't escape U+FF9E and U+FF9F in `escape_debug_ext`)
 - #160015 (refactor(mir-transform): Merge `can_be_overridden`, `is_required` and `is_enabled` into one)
 - #160031 (std: make positioned I/O unsupported on VxWorks)
 - #160125 (Fix typing mode handling in transmute checks and rustc_dump_layout)
 - #160152 (Create on-demand CI job for testing EC2 instances)
 - #160232 (rustdoc: fix ICE when a grapheme cluster joins a Prepend-class character to `_` or `:`)
 - #159214 (std: improve the documentation of the random feature)
 - #159818 (Resolve vars before calling `unnormalized_obligations`)
 - #159955 (Stop using higher-order macros to declare arenas)
 - #159958 (Fix avoid cycle for self referential return type notation)
 - #160040 (Split function parsing out of `item.rs` to a new module.)
 - #160044 (Add regression tests for fixed dead-code issues)
 - #160144 (renovate: group lockfiles PRs)
 - #160149 (Fix Windows on Arm PAC default)
 - #160164 (Derive `GenericTypeVisitable` for `RegionConstraint`)
 - #160175 (Try to recover less from incorrectly parsed const arg)
 - #160177 (A few more "predicate"-to-"clause" renamings)
 - #160181 (Mark `Tuple` and `FnPtr` traits `#[fundamental]`)
 - #160192 (Fix ICE for parsing issue with a closing brace)
 - #160209 (bootstrap: Remove method `Subcommand::kind`)
 - #160221 (Remove `Copy` supertrait from `VaList`)
 - #160223 (interpret: rename validate_operand → validate_place)
 - #160234 (Always use short ty path for call with missing arguments suggestion)
rust-bors Bot pushed a commit that referenced this pull request Jul 31, 2026
…uwer

Rollup of 25 pull requests

Successful merges:

 - #160204 (Sync from portable simd 2026 07 30)
 - #138230 (Add `raw_borrows_via_references` lint)
 - #158057 (Don't escape U+FF9E and U+FF9F in `escape_debug_ext`)
 - #160015 (refactor(mir-transform): Merge `can_be_overridden`, `is_required` and `is_enabled` into one)
 - #160031 (std: make positioned I/O unsupported on VxWorks)
 - #160125 (Fix typing mode handling in transmute checks and rustc_dump_layout)
 - #160152 (Create on-demand CI job for testing EC2 instances)
 - #160232 (rustdoc: fix ICE when a grapheme cluster joins a Prepend-class character to `_` or `:`)
 - #159214 (std: improve the documentation of the random feature)
 - #159818 (Resolve vars before calling `unnormalized_obligations`)
 - #159955 (Stop using higher-order macros to declare arenas)
 - #159958 (Fix avoid cycle for self referential return type notation)
 - #160040 (Split function parsing out of `item.rs` to a new module.)
 - #160044 (Add regression tests for fixed dead-code issues)
 - #160144 (renovate: group lockfiles PRs)
 - #160149 (Fix Windows on Arm PAC default)
 - #160164 (Derive `GenericTypeVisitable` for `RegionConstraint`)
 - #160175 (Try to recover less from incorrectly parsed const arg)
 - #160177 (A few more "predicate"-to-"clause" renamings)
 - #160181 (Mark `Tuple` and `FnPtr` traits `#[fundamental]`)
 - #160192 (Fix ICE for parsing issue with a closing brace)
 - #160209 (bootstrap: Remove method `Subcommand::kind`)
 - #160221 (Remove `Copy` supertrait from `VaList`)
 - #160223 (interpret: rename validate_operand → validate_place)
 - #160234 (Always use short ty path for call with missing arguments suggestion)
@rust-bors
rust-bors Bot merged commit 2ef4f7e into rust-lang:main Jul 31, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 31, 2026
rust-timer added a commit that referenced this pull request Jul 31, 2026
Rollup merge of #160125 - bit-aloo:2026-07-29-next-solver-typing-bugs, r=adwinwhite

Fix typing mode handling in transmute checks and rustc_dump_layout

closes: rust-lang/trait-system-refactor-initiative#283

r? @adwinwhite

cc: @lcnr
@bit-aloo
bit-aloo deleted the 2026-07-29-next-solver-typing-bugs branch July 31, 2026 08:26
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Jul 31, 2026
…uwer

Rollup of 25 pull requests

Successful merges:

 - rust-lang/rust#160204 (Sync from portable simd 2026 07 30)
 - rust-lang/rust#138230 (Add `raw_borrows_via_references` lint)
 - rust-lang/rust#158057 (Don't escape U+FF9E and U+FF9F in `escape_debug_ext`)
 - rust-lang/rust#160015 (refactor(mir-transform): Merge `can_be_overridden`, `is_required` and `is_enabled` into one)
 - rust-lang/rust#160031 (std: make positioned I/O unsupported on VxWorks)
 - rust-lang/rust#160125 (Fix typing mode handling in transmute checks and rustc_dump_layout)
 - rust-lang/rust#160152 (Create on-demand CI job for testing EC2 instances)
 - rust-lang/rust#160232 (rustdoc: fix ICE when a grapheme cluster joins a Prepend-class character to `_` or `:`)
 - rust-lang/rust#159214 (std: improve the documentation of the random feature)
 - rust-lang/rust#159818 (Resolve vars before calling `unnormalized_obligations`)
 - rust-lang/rust#159955 (Stop using higher-order macros to declare arenas)
 - rust-lang/rust#159958 (Fix avoid cycle for self referential return type notation)
 - rust-lang/rust#160040 (Split function parsing out of `item.rs` to a new module.)
 - rust-lang/rust#160044 (Add regression tests for fixed dead-code issues)
 - rust-lang/rust#160144 (renovate: group lockfiles PRs)
 - rust-lang/rust#160149 (Fix Windows on Arm PAC default)
 - rust-lang/rust#160164 (Derive `GenericTypeVisitable` for `RegionConstraint`)
 - rust-lang/rust#160175 (Try to recover less from incorrectly parsed const arg)
 - rust-lang/rust#160177 (A few more "predicate"-to-"clause" renamings)
 - rust-lang/rust#160181 (Mark `Tuple` and `FnPtr` traits `#[fundamental]`)
 - rust-lang/rust#160192 (Fix ICE for parsing issue with a closing brace)
 - rust-lang/rust#160209 (bootstrap: Remove method `Subcommand::kind`)
 - rust-lang/rust#160221 (Remove `Copy` supertrait from `VaList`)
 - rust-lang/rust#160223 (interpret: rename validate_operand → validate_place)
 - rust-lang/rust#160234 (Always use short ty path for call with missing arguments suggestion)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

transmute: cannot transmute between types of different sizes, or dependently-sized types

3 participants