Skip to content

Commit 7dda2c4

Browse files
committed
Normalise BITS in UI test
1 parent b484e58 commit 7dda2c4

4 files changed

+7
-7
lines changed

src/test/ui/lint/lint-exceeding-bitshifts.noopt.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ warning: this arithmetic operation will overflow
140140
--> $DIR/lint-exceeding-bitshifts.rs:77:15
141141
|
142142
LL | let n = 1_isize << BITS;
143-
| ^^^^^^^^^^^^^^^ attempt to shift left by `64_usize`, which would overflow
143+
| ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
144144

145145
warning: this arithmetic operation will overflow
146146
--> $DIR/lint-exceeding-bitshifts.rs:78:15
147147
|
148148
LL | let n = 1_usize << BITS;
149-
| ^^^^^^^^^^^^^^^ attempt to shift left by `64_usize`, which would overflow
149+
| ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
150150

151151
warning: 24 warnings emitted
152152

src/test/ui/lint/lint-exceeding-bitshifts.opt.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ warning: this arithmetic operation will overflow
140140
--> $DIR/lint-exceeding-bitshifts.rs:77:15
141141
|
142142
LL | let n = 1_isize << BITS;
143-
| ^^^^^^^^^^^^^^^ attempt to shift left by `64_usize`, which would overflow
143+
| ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
144144

145145
warning: this arithmetic operation will overflow
146146
--> $DIR/lint-exceeding-bitshifts.rs:78:15
147147
|
148148
LL | let n = 1_usize << BITS;
149-
| ^^^^^^^^^^^^^^^ attempt to shift left by `64_usize`, which would overflow
149+
| ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
150150

151151
warning: 24 warnings emitted
152152

src/test/ui/lint/lint-exceeding-bitshifts.opt_with_overflow_checks.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ warning: this arithmetic operation will overflow
140140
--> $DIR/lint-exceeding-bitshifts.rs:77:15
141141
|
142142
LL | let n = 1_isize << BITS;
143-
| ^^^^^^^^^^^^^^^ attempt to shift left by `64_usize`, which would overflow
143+
| ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
144144

145145
warning: this arithmetic operation will overflow
146146
--> $DIR/lint-exceeding-bitshifts.rs:78:15
147147
|
148148
LL | let n = 1_usize << BITS;
149-
| ^^^^^^^^^^^^^^^ attempt to shift left by `64_usize`, which would overflow
149+
| ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow
150150

151151
warning: 24 warnings emitted
152152

src/test/ui/lint/lint-exceeding-bitshifts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O
55
// build-pass
66
// ignore-pass (test emits codegen-time warnings and verifies that they are not errors)
7-
// normalize-stderr-test "shift left by (64|32)_usize which" -> "shift left by %BITS% which"
7+
// normalize-stderr-test "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which"
88

99
#![crate_type="lib"]
1010
#![warn(arithmetic_overflow, const_err)]

0 commit comments

Comments
 (0)