1
Fork 0

Improve parsing errors and suggestions for bad if statements

This commit is contained in:
Michael Goulet 2022-05-27 21:58:48 -07:00
parent 3bdec3c8ab
commit d1ba2d25d4
21 changed files with 325 additions and 143 deletions

View file

@ -1,9 +1,7 @@
fn main() {
let n = 1;
if 5 == {
//~^ NOTE this `if` expression has a condition, but no block
//~^ ERROR this `if` expression is missing a block after the condition
println!("five");
}
}
//~^ ERROR expected `{`, found `}`
//~| NOTE expected `{`