]> git.proxmox.com Git - rustc.git/blame - src/test/ui/parser/while-if-let-without-body.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / parser / while-if-let-without-body.rs
CommitLineData
5e7ed085
FG
1fn 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 `{`