]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/struct-literal-in-if.rs
Rollup merge of #57278 - mati865:config_clippy, r=alexcrichton
[rust.git] / src / test / ui / parser / struct-literal-in-if.rs
1 // compile-flags: -Z parse-only
2
3 struct Foo {
4     x: isize,
5 }
6
7 impl Foo {
8     fn hi(&self) -> bool {
9         true
10     }
11 }
12
13 fn main() {
14     if Foo {
15         x: 3    //~ ERROR expected type, found `3`
16     }.hi() { //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `{`
17         println!("yo");
18     }
19 }