| error: struct literals are not allowed here |
| --> $DIR/E0423-struct-literal-comment.rs:9:8 |
| | |
| LL | if T { x: 10 } == T {} {} |
| | ^^^^^^^^^^^ |
| | |
| help: surround the struct literal with parentheses |
| | |
| LL | if (T { x: 10 }) == T {} {} |
| | + + |
| |
| error: expected expression, found `==` |
| --> $DIR/E0423-struct-literal-comment.rs:15:38 |
| | |
| LL | if U { /* keep comment here */ } == U {} |
| | ^^ expected expression |
| |
| error[E0423]: cannot find value `T` in this scope |
| --> $DIR/E0423-struct-literal-comment.rs:9:23 |
| | |
| LL | if T { x: 10 } == T {} {} |
| | ^ not found in this scope |
| | |
| = note: a struct named `T` exists in another namespace |
| help: surround the struct literal with parentheses |
| | |
| LL | if T { x: 10 } == (T {}) {} |
| | + + |
| |
| error[E0423]: cannot find value `U` in this scope |
| --> $DIR/E0423-struct-literal-comment.rs:15:8 |
| | |
| LL | if U { /* keep comment here */ } == U {} |
| | ^ not found in this scope |
| | |
| = note: a struct named `U` exists in another namespace |
| help: surround the struct literal with parentheses |
| | |
| LL | if (U { /* keep comment here */ }) == U {} |
| | + + |
| |
| error: aborting due to 4 previous errors |
| |
| For more information about this error, try `rustc --explain E0423`. |