|
1 | | -error: transmute from a `u8` to a `NonZeroU8` |
2 | | - --> tests/ui/transmute_int_to_non_zero.rs:19:33 |
| 1 | +error: transmute from a `u8` to a `NonZero<u8>` |
| 2 | + --> tests/ui/transmute_int_to_non_zero.rs:19:35 |
3 | 3 | | |
4 | | -LL | let _: NonZeroU8 = unsafe { std::mem::transmute(int_u8) }; |
5 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZeroU8::new_unchecked(int_u8)` |
| 4 | +LL | let _: NonZero<u8> = unsafe { std::mem::transmute(int_u8) }; |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZero::new_unchecked(int_u8)` |
6 | 6 | | |
7 | 7 | = note: `-D clippy::transmute-int-to-non-zero` implied by `-D warnings` |
8 | 8 | = help: to override `-D warnings` add `#[allow(clippy::transmute_int_to_non_zero)]` |
9 | 9 |
|
10 | | -error: transmute from a `u16` to a `NonZeroU16` |
11 | | - --> tests/ui/transmute_int_to_non_zero.rs:22:34 |
| 10 | +error: transmute from a `u16` to a `NonZero<u16>` |
| 11 | + --> tests/ui/transmute_int_to_non_zero.rs:22:36 |
12 | 12 | | |
13 | | -LL | let _: NonZeroU16 = unsafe { std::mem::transmute(int_u16) }; |
14 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZeroU16::new_unchecked(int_u16)` |
| 13 | +LL | let _: NonZero<u16> = unsafe { std::mem::transmute(int_u16) }; |
| 14 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZero::new_unchecked(int_u16)` |
15 | 15 |
|
16 | | -error: transmute from a `u32` to a `NonZeroU32` |
17 | | - --> tests/ui/transmute_int_to_non_zero.rs:24:34 |
| 16 | +error: transmute from a `u32` to a `NonZero<u32>` |
| 17 | + --> tests/ui/transmute_int_to_non_zero.rs:24:36 |
18 | 18 | | |
19 | | -LL | let _: NonZeroU32 = unsafe { std::mem::transmute(int_u32) }; |
20 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZeroU32::new_unchecked(int_u32)` |
| 19 | +LL | let _: NonZero<u32> = unsafe { std::mem::transmute(int_u32) }; |
| 20 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZero::new_unchecked(int_u32)` |
21 | 21 |
|
22 | | -error: transmute from a `u64` to a `NonZeroU64` |
23 | | - --> tests/ui/transmute_int_to_non_zero.rs:26:34 |
| 22 | +error: transmute from a `u64` to a `NonZero<u64>` |
| 23 | + --> tests/ui/transmute_int_to_non_zero.rs:26:36 |
24 | 24 | | |
25 | | -LL | let _: NonZeroU64 = unsafe { std::mem::transmute(int_u64) }; |
26 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZeroU64::new_unchecked(int_u64)` |
| 25 | +LL | let _: NonZero<u64> = unsafe { std::mem::transmute(int_u64) }; |
| 26 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZero::new_unchecked(int_u64)` |
27 | 27 |
|
28 | | -error: transmute from a `u128` to a `NonZeroU128` |
29 | | - --> tests/ui/transmute_int_to_non_zero.rs:28:35 |
| 28 | +error: transmute from a `u128` to a `NonZero<u128>` |
| 29 | + --> tests/ui/transmute_int_to_non_zero.rs:28:37 |
30 | 30 | | |
31 | | -LL | let _: NonZeroU128 = unsafe { std::mem::transmute(int_u128) }; |
32 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZeroU128::new_unchecked(int_u128)` |
| 31 | +LL | let _: NonZero<u128> = unsafe { std::mem::transmute(int_u128) }; |
| 32 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZero::new_unchecked(int_u128)` |
33 | 33 |
|
34 | | -error: transmute from a `i8` to a `NonZeroI8` |
35 | | - --> tests/ui/transmute_int_to_non_zero.rs:31:33 |
| 34 | +error: transmute from a `i8` to a `NonZero<i8>` |
| 35 | + --> tests/ui/transmute_int_to_non_zero.rs:31:35 |
36 | 36 | | |
37 | | -LL | let _: NonZeroI8 = unsafe { std::mem::transmute(int_i8) }; |
38 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZeroI8::new_unchecked(int_i8)` |
| 37 | +LL | let _: NonZero<i8> = unsafe { std::mem::transmute(int_i8) }; |
| 38 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZero::new_unchecked(int_i8)` |
39 | 39 |
|
40 | | -error: transmute from a `i16` to a `NonZeroI16` |
41 | | - --> tests/ui/transmute_int_to_non_zero.rs:33:34 |
| 40 | +error: transmute from a `i16` to a `NonZero<i16>` |
| 41 | + --> tests/ui/transmute_int_to_non_zero.rs:33:36 |
42 | 42 | | |
43 | | -LL | let _: NonZeroI16 = unsafe { std::mem::transmute(int_i16) }; |
44 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZeroI16::new_unchecked(int_i16)` |
| 43 | +LL | let _: NonZero<i16> = unsafe { std::mem::transmute(int_i16) }; |
| 44 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZero::new_unchecked(int_i16)` |
45 | 45 |
|
46 | | -error: transmute from a `i32` to a `NonZeroI32` |
47 | | - --> tests/ui/transmute_int_to_non_zero.rs:35:34 |
| 46 | +error: transmute from a `i32` to a `NonZero<i32>` |
| 47 | + --> tests/ui/transmute_int_to_non_zero.rs:35:36 |
48 | 48 | | |
49 | | -LL | let _: NonZeroI32 = unsafe { std::mem::transmute(int_i32) }; |
50 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZeroI32::new_unchecked(int_i32)` |
| 49 | +LL | let _: NonZero<i32> = unsafe { std::mem::transmute(int_i32) }; |
| 50 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZero::new_unchecked(int_i32)` |
51 | 51 |
|
52 | | -error: transmute from a `i64` to a `NonZeroI64` |
53 | | - --> tests/ui/transmute_int_to_non_zero.rs:37:34 |
| 52 | +error: transmute from a `i64` to a `NonZero<i64>` |
| 53 | + --> tests/ui/transmute_int_to_non_zero.rs:37:36 |
54 | 54 | | |
55 | | -LL | let _: NonZeroI64 = unsafe { std::mem::transmute(int_i64) }; |
56 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZeroI64::new_unchecked(int_i64)` |
| 55 | +LL | let _: NonZero<i64> = unsafe { std::mem::transmute(int_i64) }; |
| 56 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZero::new_unchecked(int_i64)` |
57 | 57 |
|
58 | | -error: transmute from a `i128` to a `NonZeroI128` |
59 | | - --> tests/ui/transmute_int_to_non_zero.rs:39:35 |
| 58 | +error: transmute from a `i128` to a `NonZero<i128>` |
| 59 | + --> tests/ui/transmute_int_to_non_zero.rs:39:37 |
60 | 60 | | |
61 | | -LL | let _: NonZeroI128 = unsafe { std::mem::transmute(int_i128) }; |
62 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZeroI128::new_unchecked(int_i128)` |
| 61 | +LL | let _: NonZero<i128> = unsafe { std::mem::transmute(int_i128) }; |
| 62 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `NonZero::new_unchecked(int_i128)` |
63 | 63 |
|
64 | 64 | error: aborting due to 10 previous errors |
65 | 65 |
|
0 commit comments