Broken MIR: relate_type_and_user_type
may receive unnormalized types
#141708
Labels
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-types
Relevant to the types team, which will review and decide on the PR/issue.
This code ICEs:
We create a very sneaky closure type that has the signature of
for<'a> fn(<i32 as Foo<'a>>::Assoc)
. Note that this type is not normalized, because of higher-ranked normalization problems w/ the old trait solver.We then store this type into
c
in thelet
statement, and because it's a pattern, we end up storing a user type annotation that links it to the field ascription. Since it's a pattern with a single field place elem, we end up normalizing the closure type here:rust/compiler/rustc_borrowck/src/type_check/mod.rs
Line 479 in 6f69710
note that this is a full normalization in the old solver.
We then try to relate the unnormalized and normalized closure signatures, which fails in the old solver.
The text was updated successfully, but these errors were encountered: