Normalise BITS in UI test

This commit is contained in:
varkor 2020-09-20 15:30:46 +01:00
parent b484e584ec
commit 7dda2c4218
4 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)]