diff --git a/src/test/ui/lint/lint-exceeding-bitshifts.rs b/src/test/ui/lint/lint-exceeding-bitshifts.rs index 0f397a7efe8..dd3b8393429 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 f9f168c14de..25e079b6d81 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 bde4865aa3f..69b627355b8 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 8a6d2a89c70..cb96982a789 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; | ^^^^^^^^^^^^^^^