We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9712fa4 commit 40809b0Copy full SHA for 40809b0
src/librustc_mir/interpret/place.rs
@@ -413,6 +413,8 @@ where
413
// This is a narrow bug-fix for rust-lang/rust#69191: if we are
414
// trying to access absent field of uninhabited variant, then
415
// signal UB (but don't ICE the compiler).
416
+ // FIXME temporary hack to work around incoherence between
417
+ // layout computation and MIR building
418
if field >= count as u64 && base.layout.abi == layout::Abi::Uninhabited {
419
throw_ub!(Unreachable);
420
}
0 commit comments