Fix CTFE interpreter.

This commit is contained in:
Camille GILLOT 2023-02-11 17:07:36 +00:00
parent 4c93145b33
commit 7f36a3fcd7

View File

@ -137,7 +137,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
}
Assert { ref cond, expected, ref msg, target, cleanup } => {
let ignored = !self.tcx.sess.overflow_checks()
let ignored = M::checked_binop_checks_overflow(self)
&& match msg {
mir::AssertKind::OverflowNeg(..) => true,
mir::AssertKind::Overflow(op, ..) => op.is_checkable(),