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
38 | did you mean `Foo { /* fields */ }`?
39 | help: a function with a similar name exists (notice the capitalization): `foo`
42 LL | | for _ in std::ops::Range { start: 0, end: 10 } {}
45 | |_- similarly named function `foo` defined here
47 error[E0423]: expected value, found struct `T`
48 --> $DIR/E0423.rs:14:8
50 LL | if T {} == T {} { println!("Ok"); }
53 | help: surround the struct literal with parenthesis: `(T {})`
55 error: aborting due to 5 previous errors
57 For more information about this error, try `rustc --explain E0423`.