summaryrefslogtreecommitdiff
path: root/src/test/compile-fail/const-err.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/const-err.rs')
-rw-r--r--src/test/compile-fail/const-err.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/compile-fail/const-err.rs b/src/test/compile-fail/const-err.rs
index 4d156a49192..882e4cb2d47 100644
--- a/src/test/compile-fail/const-err.rs
+++ b/src/test/compile-fail/const-err.rs
@@ -8,8 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[allow(exceeding_bitshifts)]
-#[deny(const_err)]
+#![feature(rustc_attrs)]
+#![allow(exceeding_bitshifts)]
+#![deny(const_err)]
fn black_box<T>(_: T) {
unimplemented!()
@@ -18,6 +19,7 @@ fn black_box<T>(_: T) {
const BLA: u8 = 200u8 + 200u8;
//~^ ERROR attempted to add with overflow
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let a = -std::i8::MIN;
//~^ WARN attempted to negate with overflow