2023-01-08 23:29:54 -06:00
|
|
|
error: invalid struct literal
|
|
|
|
--> $DIR/method-call-on-struct-literal-in-if-condition.rs:10:8
|
|
|
|
|
|
|
|
|
LL | if Example { a: one(), }.is_pos() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2023-06-06 10:56:46 -05:00
|
|
|
help: you might need to surround the struct literal with parentheses
|
2023-01-08 23:29:54 -06:00
|
|
|
|
|
|
|
|
LL | if (Example { a: one(), }).is_pos() {
|
|
|
|
| + +
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|