2022-06-22 18:04:36 +00:00
|
|
|
error[E0381]: used binding `y` is possibly-uninitialized
|
2020-02-02 06:05:53 +00:00
|
|
|
--> $DIR/no-non-guaranteed-initialization.rs:9:5
|
2019-08-06 16:54:30 +00:00
|
|
|
|
|
2022-06-21 18:57:45 +00:00
|
|
|
LL | let y;
|
2022-06-21 22:54:17 +00:00
|
|
|
| - binding declared here but left uninitialized
|
2022-06-21 18:57:45 +00:00
|
|
|
LL | if x > 5 {
|
2022-06-22 18:04:36 +00: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 16:54:30 +00:00
|
|
|
LL | y
|
2022-06-22 18:04:36 +00:00
|
|
|
| ^ `y` used here but it is possibly-uninitialized
|
2019-08-06 16:54:30 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0381`.
|