@@ -10,44 +10,50 @@ LL | let _ = a.count_ones() == 1;
10
10
error: manually reimplementing `is_power_of_two`
11
11
--> tests/ui/manual_is_power_of_two.rs:21:13
12
12
|
13
+ LL | let _ = u64::count_ones(a) == 1;
14
+ | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `a.is_power_of_two()`
15
+
16
+ error: manually reimplementing `is_power_of_two`
17
+ --> tests/ui/manual_is_power_of_two.rs:23:13
18
+ |
13
19
LL | let _ = a & (a - 1) == 0;
14
20
| ^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `a.is_power_of_two()`
15
21
16
22
error: manually reimplementing `is_power_of_two`
17
- --> tests/ui/manual_is_power_of_two.rs:25 :13
23
+ --> tests/ui/manual_is_power_of_two.rs:27 :13
18
24
|
19
25
LL | let _ = 1 == a.count_ones();
20
26
| ^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `a.is_power_of_two()`
21
27
22
28
error: manually reimplementing `is_power_of_two`
23
- --> tests/ui/manual_is_power_of_two.rs:27 :13
29
+ --> tests/ui/manual_is_power_of_two.rs:29 :13
24
30
|
25
31
LL | let _ = (a - 1) & a == 0;
26
32
| ^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `a.is_power_of_two()`
27
33
28
34
error: manually reimplementing `is_power_of_two`
29
- --> tests/ui/manual_is_power_of_two.rs:29 :13
35
+ --> tests/ui/manual_is_power_of_two.rs:31 :13
30
36
|
31
37
LL | let _ = 0 == a & (a - 1);
32
38
| ^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `a.is_power_of_two()`
33
39
34
40
error: manually reimplementing `is_power_of_two`
35
- --> tests/ui/manual_is_power_of_two.rs:31 :13
41
+ --> tests/ui/manual_is_power_of_two.rs:33 :13
36
42
|
37
43
LL | let _ = 0 == (a - 1) & a;
38
44
| ^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `a.is_power_of_two()`
39
45
40
46
error: manually reimplementing `is_power_of_two`
41
- --> tests/ui/manual_is_power_of_two.rs:41 :13
47
+ --> tests/ui/manual_is_power_of_two.rs:43 :13
42
48
|
43
49
LL | let _ = i as u32 & (i as u32 - 1) == 0;
44
50
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `(i as u32).is_power_of_two()`
45
51
46
52
error: manually reimplementing `is_power_of_two`
47
- --> tests/ui/manual_is_power_of_two.rs:56 :5
53
+ --> tests/ui/manual_is_power_of_two.rs:58 :5
48
54
|
49
55
LL | a & (a - 1) == 0
50
56
| ^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `a.is_power_of_two()`
51
57
52
- error: aborting due to 8 previous errors
58
+ error: aborting due to 9 previous errors
53
59
0 commit comments