Fix CTFE interpreter.
This commit is contained in:
parent
4c93145b33
commit
7f36a3fcd7
@ -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(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user