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 value, found struct `T`
30 --> $DIR/E0423.rs:14:8
32 LL | if T {} == T {} { println!("Ok"); }
35 help: surround the struct literal with parentheses
37 LL | if (T {}) == T {} { println!("Ok"); }
40 error[E0423]: expected function, tuple struct or tuple variant, found struct `Foo`
41 --> $DIR/E0423.rs:4:13
43 LL | struct Foo { a: bool };
44 | ---------------------- `Foo` defined here
50 | -------- similarly named function `foo` defined here
52 help: use struct literal syntax instead
54 LL | let f = Foo { a: val };
56 help: a function with a similar name exists
61 error: aborting due to 5 previous errors
63 For more information about this error, try `rustc --explain E0423`.