]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/while-if-let-without-body.rs
Account for ADT bodies and struct expressions
[rust.git] / src / test / ui / parser / while-if-let-without-body.rs
1 fn main() {
2     let container = vec![Some(1), Some(2), None];
3
4     let mut i = 0;
5     while if let Some(thing) = container.get(i) {
6         //~^ NOTE while parsing the body of this `while` expression
7         //~| NOTE this `while` condition successfully parsed
8         println!("{:?}", thing);
9         i += 1;
10     }
11 }
12 //~^ ERROR expected `{`, found `}`
13 //~| NOTE expected `{`