Skip to content

Commit

Permalink
Normalise BITS in UI test
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Sep 26, 2020
1 parent b484e58 commit 7dda2c4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/test/ui/lint/lint-exceeding-bitshifts.noopt.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ warning: this arithmetic operation will overflow
--> $DIR/lint-exceeding-bitshifts.rs:77:15
|
LL | let n = 1_isize << BITS;
| ^^^^^^^^^^^^^^^ attempt to shift left by `64_usize`, which would overflow
| ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow

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

warning: 24 warnings emitted

4 changes: 2 additions & 2 deletions src/test/ui/lint/lint-exceeding-bitshifts.opt.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ warning: this arithmetic operation will overflow
--> $DIR/lint-exceeding-bitshifts.rs:77:15
|
LL | let n = 1_isize << BITS;
| ^^^^^^^^^^^^^^^ attempt to shift left by `64_usize`, which would overflow
| ^^^^^^^^^^^^^^^ attempt to shift left by `%BITS%`, which would overflow

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

warning: 24 warnings emitted

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

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

warning: 24 warnings emitted

2 changes: 1 addition & 1 deletion src/test/ui/lint/lint-exceeding-bitshifts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O
// build-pass
// ignore-pass (test emits codegen-time warnings and verifies that they are not errors)
// normalize-stderr-test "shift left by (64|32)_usize which" -> "shift left by %BITS% which"
// normalize-stderr-test "shift left by `(64|32)_usize`, which" -> "shift left by `%BITS%`, which"

#![crate_type="lib"]
#![warn(arithmetic_overflow, const_err)]
Expand Down

0 comments on commit 7dda2c4

Please sign in to comment.