]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/struct-literal-in-if.rs
Rollup merge of #57004 - nnethercote:TS-change-Stream, r=petrochenkov
[rust.git] / src / test / ui / parser / struct-literal-in-if.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     if 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         println!("yo");
16     }
17 }