From c31819b3ff35be5bdec58cba9515578fbff0a5b8 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 17 Oct 2018 09:24:43 +0200 Subject: [PATCH] layout should not affect CTFE checks (outside of validation) --- src/librustc_mir/interpret/operand.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/librustc_mir/interpret/operand.rs b/src/librustc_mir/interpret/operand.rs index c72a5894b6ac7..2d6b19ca4a7fc 100644 --- a/src/librustc_mir/interpret/operand.rs +++ b/src/librustc_mir/interpret/operand.rs @@ -688,9 +688,6 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> rval: OpTy<'tcx, M::PointerTag>, ) -> EvalResult<'tcx, (u128, usize)> { trace!("read_discriminant_value {:#?}", rval.layout); - if rval.layout.abi.is_uninhabited() { - return err!(Unreachable); - } match rval.layout.variants { layout::Variants::Single { index } => {