blob: 0a6e76b154f78d9d1ee1c3c792d822a6b9fdaf29 [file] [log] [blame] [edit]
error: expected expression, found `let` statement
--> $DIR/missing-let.rs:5:8
|
LL | if let Some(_) = x
| ^^^^^^^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
help: you might have meant to continue the let-chain
|
LL | && let Some(x) = x
| +++
help: you might have meant to compare for equality
|
LL | && Some(x) == x
| +
error: expected expression, found `let` statement
--> $DIR/missing-let.rs:13:9
|
LL | let Some(_) = z
| ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: let-chain with missing `let`
--> $DIR/missing-let.rs:10:8
|
LL | if Some(_) = y &&
| ^^^^^^^----
| |
| expected `let` expression, found assignment
...
LL | let Some(_) = z
| --------------- let expression later in the condition
|
help: add `let` before the expression
|
LL | if let Some(_) = y &&
| +++
error: aborting due to 3 previous errors