blob: d4b2c902f9b2ed4e275dc4c902a4d4acb8f1267d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
error[E0308]: mismatched types
--> $DIR/non_zero_assigned_something.rs:2:35
|
LL | let _: std::num::NonZeroU64 = 1;
| -------------------- ^ expected struct `NonZeroU64`, found integer
| |
| expected due to this
|
help: consider calling `NonZeroU64::new`
|
LL | let _: std::num::NonZeroU64 = NonZeroU64::new(1).unwrap();
| ++++++++++++++++ ++++++++++
error[E0308]: mismatched types
--> $DIR/non_zero_assigned_something.rs:6:43
|
LL | let _: Option<std::num::NonZeroU64> = 1;
| ---------------------------- ^ expected enum `Option`, found integer
| |
| expected due to this
|
= note: expected enum `Option<NonZeroU64>`
found type `{integer}`
help: consider calling `NonZeroU64::new`
|
LL | let _: Option<std::num::NonZeroU64> = NonZeroU64::new(1);
| ++++++++++++++++ +
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.
|