]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-fail/overflowing-lsh-2.rs
Add #[rustc_no_mir] to make tests pass with -Z orbit.
[rust.git] / src / test / run-fail / overflowing-lsh-2.rs
index fd3e801457c2359912fe3ce1680796b25d137520..fe0bcc5b98545f62ec02fae195cd229d648a4437 100644 (file)
@@ -8,12 +8,15 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-pretty : (#23623) problems when  ending with // comments
+
 // error-pattern:thread '<main>' panicked at 'shift operation overflowed'
 // compile-flags: -C debug-assertions
 
-// (Work around constant-evaluation)
-fn id<T>(x: T) -> T { x }
+#![warn(exceeding_bitshifts)]
 
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
 fn main() {
-    let _x = 1 << id(-1);
+    let _x = 1 << -1;
 }