1 error: struct literals are not allowed here
2 --> $DIR/E0423.rs:12:32
4 LL | if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); }
7 help: surround the struct literal with parentheses
9 LL | if let S { x: _x, y: 2 } = (S { x: 1, y: 2 }) { println!("Ok"); }
12 error: expected expression, found `==`
13 --> $DIR/E0423.rs:14:13
15 LL | if T {} == T {} { println!("Ok"); }
16 | ^^ expected expression
18 error: struct literals are not allowed here
19 --> $DIR/E0423.rs:20:14
21 LL | for _ in std::ops::Range { start: 0, end: 10 } {}
22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 help: surround the struct literal with parentheses
26 LL | for _ in (std::ops::Range { start: 0, end: 10 }) {}
29 error[E0423]: expected function, tuple struct or tuple variant, found struct `Foo`
30 --> $DIR/E0423.rs:4:13
32 LL | struct Foo { a: bool };
33 | ---------------------- `Foo` defined here
39 | -------- similarly named function `foo` defined here
41 help: use struct literal syntax instead
43 LL | let f = Foo { a: val };
45 help: a function with a similar name exists
50 error[E0423]: expected value, found struct `T`
51 --> $DIR/E0423.rs:14:8
53 LL | if T {} == T {} { println!("Ok"); }
56 help: surround the struct literal with parentheses
58 LL | if (T {}) == T {} { println!("Ok"); }
61 error: aborting due to 5 previous errors
63 For more information about this error, try `rustc --explain E0423`.