Closed
Description
When encountering code like if 42 => 2 {}
, we currently emit
error: expected `{`, found `=>`
--> src/main.rs:2:10
|
2 | if 42 => 2 {}
| ^^ expected `{`
|
note: the `if` expression is missing a block after this condition
--> src/main.rs:2:7
|
2 | if 42 => 2 {}
| ^^
But it should be closer to
error: expected `{`, found `=>`
--> src/main.rs:2:10
|
2 | if 42 => 2 {}
| ^^ expected `{`
|
note: you likely meant to write a "greater than or equal to" comparison
--> src/main.rs:2:7
|
2 - if 42 => 2 {}
2 + if 42 >= 2 {}
|