layout should not affect CTFE checks (outside of validation)
This commit is contained in:
parent
37ba1071c6
commit
c31819b3ff
@ -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 } => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user