Skip to content

Commit 19a9441

Browse files
committed
Update to latest rustc diagnostic output
1 parent 6bdb597 commit 19a9441

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

clippy_tests/examples/bit_masks.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ error: bit mask could be simplified with a call to `trailing_zeros`
1010
--> bit_masks.rs:12:5
1111
|
1212
12 | x & 0 == 0;
13-
| ^^^^^^^^^^ help: try `x.trailing_zeros() > 0`
13+
| ^^^^^^^^^^ help: try: `x.trailing_zeros() > 0`
1414
|
1515
= note: `-D verbose-bit-mask` implied by `-D warnings`
1616

1717
error: bit mask could be simplified with a call to `trailing_zeros`
1818
--> bit_masks.rs:14:5
1919
|
2020
14 | x & 1 == 0; //ok, compared with zero
21-
| ^^^^^^^^^^ help: try `x.trailing_zeros() > 1`
21+
| ^^^^^^^^^^ help: try: `x.trailing_zeros() > 1`
2222

2323
error: incompatible bit mask: `_ & 2` can never be equal to `1`
2424
--> bit_masks.rs:15:5

clippy_tests/examples/trailing_zeros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
fn main() {
66
let x: i32 = 42;
77
let _ = #[clippy(author)] (x & 0b1111 == 0); // suggest trailing_zeros
8-
let _ = x & 0b11111 == 0; // suggest trailing_zeros
9-
let _ = x & 0b11010 == 0; // do not lint
8+
let _ = x & 0b1_1111 == 0; // suggest trailing_zeros
9+
let _ = x & 0b1_1010 == 0; // do not lint
1010
}

clippy_tests/examples/trailing_zeros.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ error: bit mask could be simplified with a call to `trailing_zeros`
22
--> trailing_zeros.rs:7:31
33
|
44
7 | let _ = #[clippy(author)] (x & 0b1111 == 0); // suggest trailing_zeros
5-
| ^^^^^^^^^^^^^^^^^ help: try `x.trailing_zeros() > 4`
5+
| ^^^^^^^^^^^^^^^^^ help: try: `x.trailing_zeros() > 4`
66
|
77
= note: `-D verbose-bit-mask` implied by `-D warnings`
88

99
error: bit mask could be simplified with a call to `trailing_zeros`
1010
--> trailing_zeros.rs:8:13
1111
|
12-
8 | let _ = x & 0b11111 == 0; // suggest trailing_zeros
13-
| ^^^^^^^^^^^^^^^^ help: try `x.trailing_zeros() > 5`
12+
8 | let _ = x & 0b1_1111 == 0; // suggest trailing_zeros
13+
| ^^^^^^^^^^^^^^^^^ help: try: `x.trailing_zeros() > 5`
1414

1515
error: aborting due to 2 previous errors
1616

0 commit comments

Comments
 (0)