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