diff --git a/src/test/ui/lint/lint-exceeding-bitshifts.rs b/src/test/ui/lint/lint-exceeding-bitshifts.rs index 0f397a7efe81f..dd3b839342911 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts.rs +++ b/src/test/ui/lint/lint-exceeding-bitshifts.rs @@ -1,3 +1,5 @@ +// compile-flags: -O + #![deny(exceeding_bitshifts, const_err)] #![allow(unused_variables)] #![allow(dead_code)] diff --git a/src/test/ui/lint/lint-exceeding-bitshifts.stderr b/src/test/ui/lint/lint-exceeding-bitshifts.stderr index f9f168c14dee3..25e079b6d814f 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts.stderr +++ b/src/test/ui/lint/lint-exceeding-bitshifts.stderr @@ -1,113 +1,113 @@ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:7:15 + --> $DIR/lint-exceeding-bitshifts.rs:9:15 | LL | let n = 1u8 << 8; | ^^^^^^^^ | note: lint level defined here - --> $DIR/lint-exceeding-bitshifts.rs:1:9 + --> $DIR/lint-exceeding-bitshifts.rs:3:9 | LL | #![deny(exceeding_bitshifts, const_err)] | ^^^^^^^^^^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:9:15 + --> $DIR/lint-exceeding-bitshifts.rs:11:15 | LL | let n = 1u16 << 16; | ^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:11:15 + --> $DIR/lint-exceeding-bitshifts.rs:13:15 | LL | let n = 1u32 << 32; | ^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:13:15 + --> $DIR/lint-exceeding-bitshifts.rs:15:15 | LL | let n = 1u64 << 64; | ^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:15:15 + --> $DIR/lint-exceeding-bitshifts.rs:17:15 | LL | let n = 1i8 << 8; | ^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:17:15 + --> $DIR/lint-exceeding-bitshifts.rs:19:15 | LL | let n = 1i16 << 16; | ^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:19:15 + --> $DIR/lint-exceeding-bitshifts.rs:21:15 | LL | let n = 1i32 << 32; | ^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:21:15 + --> $DIR/lint-exceeding-bitshifts.rs:23:15 | LL | let n = 1i64 << 64; | ^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:24:15 + --> $DIR/lint-exceeding-bitshifts.rs:26:15 | LL | let n = 1u8 >> 8; | ^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:26:15 + --> $DIR/lint-exceeding-bitshifts.rs:28:15 | LL | let n = 1u16 >> 16; | ^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:28:15 + --> $DIR/lint-exceeding-bitshifts.rs:30:15 | LL | let n = 1u32 >> 32; | ^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:30:15 + --> $DIR/lint-exceeding-bitshifts.rs:32:15 | LL | let n = 1u64 >> 64; | ^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:32:15 + --> $DIR/lint-exceeding-bitshifts.rs:34:15 | LL | let n = 1i8 >> 8; | ^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:34:15 + --> $DIR/lint-exceeding-bitshifts.rs:36:15 | LL | let n = 1i16 >> 16; | ^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:36:15 + --> $DIR/lint-exceeding-bitshifts.rs:38:15 | LL | let n = 1i32 >> 32; | ^^^^^^^^^^ error: attempt to shift right with overflow - --> $DIR/lint-exceeding-bitshifts.rs:38:15 + --> $DIR/lint-exceeding-bitshifts.rs:40:15 | LL | let n = 1i64 >> 64; | ^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:42:15 + --> $DIR/lint-exceeding-bitshifts.rs:44:15 | LL | let n = n << 8; | ^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts.rs:44:15 + --> $DIR/lint-exceeding-bitshifts.rs:46:15 | LL | let n = 1u8 << -8; | ^^^^^^^^^ diff --git a/src/test/ui/lint/lint-exceeding-bitshifts2.rs b/src/test/ui/lint/lint-exceeding-bitshifts2.rs index bde4865aa3f9e..69b627355b801 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts2.rs +++ b/src/test/ui/lint/lint-exceeding-bitshifts2.rs @@ -1,3 +1,5 @@ +// compile-flags: -O + #![deny(exceeding_bitshifts, const_err)] #![allow(unused_variables)] #![allow(dead_code)] diff --git a/src/test/ui/lint/lint-exceeding-bitshifts2.stderr b/src/test/ui/lint/lint-exceeding-bitshifts2.stderr index 8a6d2a89c7063..cb96982a78930 100644 --- a/src/test/ui/lint/lint-exceeding-bitshifts2.stderr +++ b/src/test/ui/lint/lint-exceeding-bitshifts2.stderr @@ -1,23 +1,23 @@ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts2.rs:7:15 + --> $DIR/lint-exceeding-bitshifts2.rs:9:15 | LL | let n = 1u8 << (4+4); | ^^^^^^^^^^^^ | note: lint level defined here - --> $DIR/lint-exceeding-bitshifts2.rs:1:9 + --> $DIR/lint-exceeding-bitshifts2.rs:3:9 | LL | #![deny(exceeding_bitshifts, const_err)] | ^^^^^^^^^^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts2.rs:15:15 + --> $DIR/lint-exceeding-bitshifts2.rs:17:15 | LL | let n = 1_isize << BITS; | ^^^^^^^^^^^^^^^ error: attempt to shift left with overflow - --> $DIR/lint-exceeding-bitshifts2.rs:16:15 + --> $DIR/lint-exceeding-bitshifts2.rs:18:15 | LL | let n = 1_usize << BITS; | ^^^^^^^^^^^^^^^