mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 09:32:42 +00:00
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.