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"); }
6 help: surround the struct literal with parenthesis
8 LL | if let S { x: _x, y: 2 } = (S { x: 1, y: 2 }) { println!("Ok"); }
11 error: expected expression, found `==`
12 --> $DIR/E0423.rs:14:13
14 LL | if T {} == T {} { println!("Ok"); }
15 | ^^ expected expression
17 error: struct literals are not allowed here
18 --> $DIR/E0423.rs:20:14
20 LL | for _ in std::ops::Range { start: 0, end: 10 } {}
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 help: surround the struct literal with parenthesis
24 LL | for _ in (std::ops::Range { start: 0, end: 10 }) {}
27 error[E0423]: expected function, found struct `Foo`
28 --> $DIR/E0423.rs:4:13
33 | did you mean `Foo { /* fields */ }`?
34 | help: a function with a similar name exists: `foo`
36 error[E0423]: expected value, found struct `T`
37 --> $DIR/E0423.rs:14:8
39 LL | if T {} == T {} { println!("Ok"); }
42 | help: surround the struct literal with parenthesis: `(T {})`
44 error: aborting due to 5 previous errors
46 For more information about this error, try `rustc --explain E0423`.