rust/compiler/rustc_trait_selection
Jonathan Brouwer 29ecd0fff5
Rollup merge of #151703 - zedddie:fix-151462-ice, r=jdonszelmann
Fix ICE in transmutability error reporting when type aliases are normalized

Fixes rust-lang/rust#151462

Transmutability error reporting hit an ICE when type aliases were normalized for diagnostics. For example, when type
 `JustUnit = ()` normalizes to `()`, the check passes unexpectedly even though the original check with `JustUnit` failed.

Fixed by adding a retry in the `Answer::Yes` arm that checks with the root obligation's types before panicking. The retry only occurs when the root obligation differs and is a Transmute trait predicate.

Also added a test that reproduces the original ICE.
2026-02-18 18:55:15 +01:00
..
src Rollup merge of #151703 - zedddie:fix-151462-ice, r=jdonszelmann 2026-02-18 18:55:15 +01:00
Cargo.toml Convert to inline diagnostics in rustc_trait_selection 2026-02-05 16:58:59 +01:00