Improve parsing errors and suggestions for bad if statements
This commit is contained in:
parent
3bdec3c8ab
commit
d1ba2d25d4
21 changed files with 325 additions and 143 deletions
|
@ -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 `{`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue