We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 693bb99 commit 35378dfCopy full SHA for 35378df
src/tools/miri/tests/pass/overflow_checks_off.rs
@@ -1,12 +1,17 @@
1
//@compile-flags: -C overflow-checks=off
2
3
// Check that we correctly implement the intended behavior of these operators
4
-// when they are not being overflow-checked.
+// when they are not being overflow-checked at runtime.
5
6
// FIXME: if we call the functions in `std::ops`, we still get the panics.
7
// Miri does not implement the codegen-time hack that backs `#[rustc_inherit_overflow_checks]`.
8
// use std::ops::*;
9
10
+
11
+// Disable _compile-time_ overflow linting
12
+// so that we can test runtime overflow checks
13
+ #![allow(arithmetic_overflow)]
14
15
fn main() {
16
assert_eq!(-{ -0x80i8 }, -0x80);
17
0 commit comments