2024-08-01 06:59:07 -05:00
|
|
|
error: consider using `NonZeroU64::from()` for more efficient and type-safe conversion
|
|
|
|
--> tests/ui/non_zero_suggestions_unfixable.rs:6:18
|
|
|
|
|
|
|
|
|
LL | let x: u64 = u64::from(NonZeroU32::new(5).unwrap().get());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroU64::from(NonZeroU32::new(5).unwrap())`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::non-zero-suggestions` implied by `-D warnings`
|
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::non_zero_suggestions)]`
|
|
|
|
|
|
|
|
error: consider using `NonZeroU64::from()` for more efficient and type-safe conversion
|
|
|
|
--> tests/ui/non_zero_suggestions_unfixable.rs:10:13
|
|
|
|
|
|
|
|
|
LL | let y = u64::from(n.get());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroU64::from(n)`
|
|
|
|
|
|
|
|
error: consider using `NonZeroU64::from()` for more efficient and type-safe conversion
|
2024-08-31 01:23:16 -05:00
|
|
|
--> tests/ui/non_zero_suggestions_unfixable.rs:19:5
|
2024-08-01 06:59:07 -05:00
|
|
|
|
|
|
|
|
LL | u64::from(y.get())
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroU64::from(y)`
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|