2021-12-21 16:03:51 -06:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/hidden-parent.rs:6:26
|
|
|
|
|
|
|
|
|
LL | let x: Option<i32> = 1i32;
|
2023-01-02 20:00:33 -06:00
|
|
|
| ----------- ^^^^ expected `Option<i32>`, found `i32`
|
2021-12-21 16:03:51 -06:00
|
|
|
| |
|
|
|
|
| expected due to this
|
|
|
|
|
|
|
|
|
= note: expected enum `Option<i32>`
|
|
|
|
found type `i32`
|
2022-07-24 16:25:35 -05:00
|
|
|
help: try wrapping the expression in `Some`
|
2021-12-21 16:03:51 -06:00
|
|
|
|
|
2022-07-24 16:25:35 -05:00
|
|
|
LL | let x: Option<i32> = Some(1i32);
|
|
|
|
| +++++ +
|
2021-12-21 16:03:51 -06:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|