mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
f6c6e847e1
Fix ICE in normalization during closure capture analysis (#149746) This fixes an internal compiler error that occurred when normalizing associated types during closure capture analysis. The Fix: Modified rustc_middle/src/ty/normalize_erasing_regions.rs to gracefully handle projection normalization failures instead of panicking when analyzing closure captures. Regression Test: Added tests/ui/associated-types/normalization-ice-issue-149746.rs, a reproduction case involving complex associated type projections (<() as Owner>::Ty<T>) that previously crashed the compiler. Verified it now emits a standard type error (E0277). Fixes rust-lang/rust#149746