about summary refs log tree commit diff
path: root/tests/incremental/warnings-reemitted.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/incremental/warnings-reemitted.rs')
-rw-r--r--tests/incremental/warnings-reemitted.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/incremental/warnings-reemitted.rs b/tests/incremental/warnings-reemitted.rs
new file mode 100644
index 00000000000..0e6b8823241
--- /dev/null
+++ b/tests/incremental/warnings-reemitted.rs
@@ -0,0 +1,9 @@
+// revisions: cfail1 cfail2 cfail3
+// compile-flags: -Coverflow-checks=on
+// build-pass
+
+#![warn(arithmetic_overflow)]
+
+fn main() {
+    let _ = 255u8 + 1; //~ WARNING operation will overflow
+}