]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/const-err.rs
Add #[rustc_no_mir] to make tests pass with -Z orbit.
[rust.git] / src / test / compile-fail / const-err.rs
index 4d156a49192fd403fb0b894aafb74292c4865eaf..882e4cb2d47e29e99d25056cd82bcdcf4f980c20 100644 (file)
@@ -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