]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/struct-literal-in-while.rs
Auto merge of #51285 - Mark-Simulacrum:remove-quote_apis, r=Manishearth
[rust.git] / src / test / ui / parser / struct-literal-in-while.rs
1 struct Foo {
2     x: isize,
3 }
4
5 impl Foo {
6     fn hi(&self) -> bool {
7         true
8     }
9 }
10
11 fn main() {
12     while Foo { //~ ERROR expected value, found struct `Foo`
13         x: 3    //~ ERROR expected type, found `3`
14     }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
15              //~| ERROR no method named `hi` found for type `()` in the current scope
16         println!("yo");
17     }
18 }