From 40809b0585d5fe3ddad39fe00a608394ad1dec30 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Fri, 6 Mar 2020 08:48:58 +0100 Subject: Add FIXME --- src/librustc_mir/interpret/place.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/librustc_mir/interpret/place.rs b/src/librustc_mir/interpret/place.rs index 33161dfa52c..721766cc932 100644 --- a/src/librustc_mir/interpret/place.rs +++ b/src/librustc_mir/interpret/place.rs @@ -413,6 +413,8 @@ where // This is a narrow bug-fix for rust-lang/rust#69191: if we are // trying to access absent field of uninhabited variant, then // signal UB (but don't ICE the compiler). + // FIXME temporary hack to work around incoherence between + // layout computation and MIR building if field >= count as u64 && base.layout.abi == layout::Abi::Uninhabited { throw_ub!(Unreachable); } -- cgit 1.4.1-3-g733a5