2022-06-21 22:54:17 +00:00
|
|
|
error[E0381]: used binding `y` isn't initialized in all conditions
|
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-21 22:54:17 +00:00
|
|
|
| ----- this `if` expression might be missing an `else` arm that initializes `y`
|
2022-06-21 18:57:45 +00:00
|
|
|
...
|
2019-08-06 16:54:30 +00:00
|
|
|
LL | y
|
2022-06-21 18:57:45 +00:00
|
|
|
| ^ `y` used here but it isn't initialized in all conditions
|
2019-08-06 16:54:30 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0381`.
|