about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-02-11 17:07:36 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-02-18 21:35:02 +0000
commit7f36a3fcd788292c56c3a21e6145e7f6c78f0d84 (patch)
tree470ac055b25c17cc78bf59267f8eb0088d2c9b76 /compiler/rustc_const_eval/src
parent4c93145b3304f7d1f4ec7ac284595f3505f4de72 (diff)
downloadrust-7f36a3fcd788292c56c3a21e6145e7f6c78f0d84.tar.gz
rust-7f36a3fcd788292c56c3a21e6145e7f6c78f0d84.zip
Fix CTFE interpreter.
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/interpret/terminator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs
index 919eaca90ce..d9a390184d9 100644
--- a/compiler/rustc_const_eval/src/interpret/terminator.rs
+++ b/compiler/rustc_const_eval/src/interpret/terminator.rs
@@ -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(),