about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2018-10-17 09:24:43 +0200
committerRalf Jung <post@ralfj.de>2018-10-17 09:24:43 +0200
commitc31819b3ff35be5bdec58cba9515578fbff0a5b8 (patch)
tree57b1572e21f090ee11497e816b9245f3886da9b6
parent37ba1071c626c43a5b85752b4ffcf6a87e2b745e (diff)
downloadrust-c31819b3ff35be5bdec58cba9515578fbff0a5b8.tar.gz
rust-c31819b3ff35be5bdec58cba9515578fbff0a5b8.zip
layout should not affect CTFE checks (outside of validation)
-rw-r--r--src/librustc_mir/interpret/operand.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/librustc_mir/interpret/operand.rs b/src/librustc_mir/interpret/operand.rs
index c72a5894b6a..2d6b19ca4a7 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 } => {