Closed
Description
Given the following code:
fn main() {
let value = if true && {
3
} else { 4 };
}
The current output is:
error: missing condition for `if` expression
--> src/main.rs:2:19
|
2 | let value = if true && {
| ^ expected if condition here
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `{`
--> src/main.rs:4:12
|
4 | } else { 4 };
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
error: could not compile `wtf2` due to 2 previous errors
Ideally the output would refer to either the &&
or at least that there is an unexpected else or something 🤔