Skip to content

Commit 56e6588

Browse files
committed
Remove unrelated lints from tests
1 parent 03ca52e commit 56e6588

File tree

3 files changed

+10
-22
lines changed

3 files changed

+10
-22
lines changed

tests/ui/xor_used_as_pow.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-rustfix
22
#![warn(clippy::xor_used_as_pow)]
3+
#![allow(clippy::identity_op)]
34

45
// Should not be linted
56
#[allow(dead_code)]

tests/ui/xor_used_as_pow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-rustfix
22
#![warn(clippy::xor_used_as_pow)]
3+
#![allow(clippy::identity_op)]
34

45
// Should not be linted
56
#[allow(dead_code)]

tests/ui/xor_used_as_pow.stderr

+8-22
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,52 @@
11
error: it appears you are trying to get a power of two, but `^` is not an exponentiation operator
2-
--> $DIR/xor_used_as_pow.rs:23:13
2+
--> $DIR/xor_used_as_pow.rs:24:13
33
|
44
LL | let _ = 2 ^ 3;
55
| ^^^^^ help: use a bitshift or constant instead: `1_u32 << 3`
66
|
77
= note: `-D clippy::xor-used-as-pow` implied by `-D warnings`
88

99
error: `^` is not an exponentiation operator but appears to have been used as one
10-
--> $DIR/xor_used_as_pow.rs:24:13
10+
--> $DIR/xor_used_as_pow.rs:25:13
1111
|
1212
LL | let _ = 10 ^ 4;
1313
| ^^^^^^
1414
|
1515
= help: did you mean to use .pow()?
1616

1717
error: it appears you are trying to get a power of two, but `^` is not an exponentiation operator
18-
--> $DIR/xor_used_as_pow.rs:25:13
18+
--> $DIR/xor_used_as_pow.rs:26:13
1919
|
2020
LL | let _ = 2 ^ 32;
2121
| ^^^^^^ help: use a bitshift or constant instead: `1_u64 << 32`
2222

23-
error: the operation is ineffective. Consider reducing it to `2`
24-
--> $DIR/xor_used_as_pow.rs:26:13
25-
|
26-
LL | let _ = 2 ^ 0;
27-
| ^^^^^
28-
|
29-
= note: `-D clippy::identity-op` implied by `-D warnings`
30-
3123
error: it appears you are trying to get a power of two, but `^` is not an exponentiation operator
32-
--> $DIR/xor_used_as_pow.rs:26:13
24+
--> $DIR/xor_used_as_pow.rs:27:13
3325
|
3426
LL | let _ = 2 ^ 0;
3527
| ^^^^^ help: use a bitshift or constant instead: `1`
3628

37-
error: the operation is ineffective. Consider reducing it to `10`
38-
--> $DIR/xor_used_as_pow.rs:27:13
39-
|
40-
LL | let _ = 10 ^ 0;
41-
| ^^^^^^
42-
4329
error: `^` is not an exponentiation operator but appears to have been used as one
44-
--> $DIR/xor_used_as_pow.rs:27:13
30+
--> $DIR/xor_used_as_pow.rs:28:13
4531
|
4632
LL | let _ = 10 ^ 0;
4733
| ^^^^^^
4834
|
4935
= help: did you mean to use .pow()?
5036

5137
error: it appears you are trying to get a power of two, but `^` is not an exponentiation operator
52-
--> $DIR/xor_used_as_pow.rs:30:17
38+
--> $DIR/xor_used_as_pow.rs:31:17
5339
|
5440
LL | let _ = 2 ^ x;
5541
| ^^^^^ help: use a bitshift or constant instead: `1 << x`
5642

5743
error: `^` is not an exponentiation operator but appears to have been used as one
58-
--> $DIR/xor_used_as_pow.rs:31:17
44+
--> $DIR/xor_used_as_pow.rs:32:17
5945
|
6046
LL | let _ = 10 ^ x;
6147
| ^^^^^^
6248
|
6349
= help: did you mean to use .pow()?
6450

65-
error: aborting due to 9 previous errors
51+
error: aborting due to 7 previous errors
6652

0 commit comments

Comments
 (0)