make UB during CTFE a hard error

This commit is contained in:
Ralf Jung 2021-06-10 10:02:01 +02:00
parent 1989b9a0b5
commit 3c08cf8e5e

View File

@ -525,6 +525,7 @@ pub fn is_hard_err(&self) -> bool {
use InterpError::*;
match *self {
MachineStop(ref err) => err.is_hard_err(),
InterpError::UndefinedBehavior(_) => true,
_ => false,
}
}