about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/non_zero_suggestions_unfixable.stderr
blob: d2ac983d4f7f0eca039bf01b9c7b95f7a20f0f9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
  --> tests/ui/non_zero_suggestions_unfixable.rs:20:5
   |
LL |     u64::from(y.get())
   |     ^^^^^^^^^^^^^^^^^^ help: replace with: `NonZeroU64::from(y)`

error: aborting due to 3 previous errors