diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-02-11 17:07:36 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-02-18 21:35:02 +0000 |
| commit | 7f36a3fcd788292c56c3a21e6145e7f6c78f0d84 (patch) | |
| tree | 470ac055b25c17cc78bf59267f8eb0088d2c9b76 /compiler/rustc_const_eval/src | |
| parent | 4c93145b3304f7d1f4ec7ac284595f3505f4de72 (diff) | |
| download | rust-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.rs | 2 |
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(), |
