mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
47a418420e
Fix ICE with unsized type in const pattern Fixes #87046. The `deref_const()` query currently contains the following check: https://github.com/rust-lang/rust/blob/e9a387d6cf5961a7f2dcb671da3147bd413355c4/compiler/rustc_mir/src/const_eval/mod.rs#L191-L204 i.e. this will cause an ICE for every unsized type except slices. An error is reported with my changes if such a type is used as a const pattern (this should not be a breaking change, since so far, this has caused an ICE).