|
1 |
| -error: Consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
| 1 | +error: consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
2 | 2 | --> tests/ui/non_zero_suggestions.rs:11:18
|
3 | 3 | |
|
4 | 4 | LL | let r1 = x / u64::from(y.get());
|
5 |
| - | ^^^^^^^^^^^^^^^^^^ help: Replace with: `NonZeroU64::from(y)` |
| 5 | + | ^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroU64::from(y)` |
6 | 6 | |
|
7 | 7 | = note: `-D clippy::non-zero-suggestions` implied by `-D warnings`
|
8 | 8 | = help: to override `-D warnings` add `#[allow(clippy::non_zero_suggestions)]`
|
9 | 9 |
|
10 |
| -error: Consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
| 10 | +error: consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
11 | 11 | --> tests/ui/non_zero_suggestions.rs:12:18
|
12 | 12 | |
|
13 | 13 | LL | let r2 = x % u64::from(y.get());
|
14 |
| - | ^^^^^^^^^^^^^^^^^^ help: Replace with: `NonZeroU64::from(y)` |
| 14 | + | ^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroU64::from(y)` |
15 | 15 |
|
16 |
| -error: Consider using `NonZeroU32::from()` for more efficient and type-safe conversion |
| 16 | +error: consider using `NonZeroU32::from()` for more efficient and type-safe conversion |
17 | 17 | --> tests/ui/non_zero_suggestions.rs:17:18
|
18 | 18 | |
|
19 | 19 | LL | let r3 = a / u32::from(b.get());
|
20 |
| - | ^^^^^^^^^^^^^^^^^^ help: Replace with: `NonZeroU32::from(b)` |
| 20 | + | ^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroU32::from(b)` |
21 | 21 |
|
22 |
| -error: Consider using `NonZeroI16::from()` for more efficient and type-safe conversion |
| 22 | +error: consider using `NonZeroI16::from()` for more efficient and type-safe conversion |
23 | 23 | --> tests/ui/non_zero_suggestions.rs:22:14
|
24 | 24 | |
|
25 | 25 | LL | let r4 = i16::from(d.get());
|
26 |
| - | ^^^^^^^^^^^^^^^^^^ help: Replace with: `NonZeroI16::from(d)` |
| 26 | + | ^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroI16::from(d)` |
27 | 27 |
|
28 |
| -error: Consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
| 28 | +error: consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
29 | 29 | --> tests/ui/non_zero_suggestions.rs:27:18
|
30 | 30 | |
|
31 | 31 | LL | let r5 = m / u64::from(n.get());
|
32 |
| - | ^^^^^^^^^^^^^^^^^^ help: Replace with: `NonZeroU64::from(n)` |
| 32 | + | ^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroU64::from(n)` |
33 | 33 |
|
34 |
| -error: Consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
| 34 | +error: consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
35 | 35 | --> tests/ui/non_zero_suggestions.rs:33:14
|
36 | 36 | |
|
37 | 37 | LL | let r6 = u64::from(max_u32.get());
|
38 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^ help: Replace with: `NonZeroU64::from(max_u32)` |
| 38 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroU64::from(max_u32)` |
39 | 39 |
|
40 |
| -error: Consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
| 40 | +error: consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
41 | 41 | --> tests/ui/non_zero_suggestions.rs:36:13
|
42 | 42 | |
|
43 | 43 | LL | let _ = u64::from(NonZeroU32::new(10).unwrap().get());
|
44 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Replace with: `NonZeroU64::from(NonZeroU32::new(10).unwrap())` |
| 44 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroU64::from(NonZeroU32::new(10).unwrap())` |
45 | 45 |
|
46 |
| -error: Consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
| 46 | +error: consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
47 | 47 | --> tests/ui/non_zero_suggestions.rs:58:9
|
48 | 48 | |
|
49 | 49 | LL | x / u64::from(y.get())
|
50 |
| - | ^^^^^^^^^^^^^^^^^^ help: Replace with: `NonZeroU64::from(y)` |
| 50 | + | ^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroU64::from(y)` |
51 | 51 |
|
52 |
| -error: Consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
| 52 | +error: consider using `NonZeroU64::from()` for more efficient and type-safe conversion |
53 | 53 | --> tests/ui/non_zero_suggestions.rs:67:22
|
54 | 54 | |
|
55 | 55 | LL | self.value / u64::from(divisor.get())
|
56 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^ help: Replace with: `NonZeroU64::from(divisor)` |
| 56 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroU64::from(divisor)` |
57 | 57 |
|
58 | 58 | error: aborting due to 9 previous errors
|
59 | 59 |
|
0 commit comments