2022-06-22 13:04:36 -05:00
|
|
|
error[E0381]: used binding `y` is possibly-uninitialized
|
2020-02-02 00:05:53 -06:00
|
|
|
--> $DIR/no-non-guaranteed-initialization.rs:9:5
|
2019-08-06 11:54:30 -05:00
|
|
|
|
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | let y;
|
2022-06-21 17:54:17 -05:00
|
|
|
| - binding declared here but left uninitialized
|
2022-06-21 13:57:45 -05:00
|
|
|
LL | if x > 5 {
|
2022-06-22 13:04:36 -05:00
|
|
|
| ----- if this `if` condition is `false`, `y` is not initialized
|
|
|
|
LL | y = echo(10).await;
|
|
|
|
LL | }
|
|
|
|
| - an `else` arm might be missing here, initializing `y`
|
2019-08-06 11:54:30 -05:00
|
|
|
LL | y
|
2022-06-22 13:04:36 -05:00
|
|
|
| ^ `y` used here but it is possibly-uninitialized
|
2019-08-06 11:54:30 -05:00
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2019-08-06 11:54:30 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0381`.
|