Skip to content

Commit c31819b

Browse files
committed
layout should not affect CTFE checks (outside of validation)
1 parent 37ba107 commit c31819b

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/librustc_mir/interpret/operand.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,6 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
688688
rval: OpTy<'tcx, M::PointerTag>,
689689
) -> EvalResult<'tcx, (u128, usize)> {
690690
trace!("read_discriminant_value {:#?}", rval.layout);
691-
if rval.layout.abi.is_uninhabited() {
692-
return err!(Unreachable);
693-
}
694691

695692
match rval.layout.variants {
696693
layout::Variants::Single { index } => {

0 commit comments

Comments
 (0)