]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/method-call-on-struct-literal-in-if-condition.stderr
Merge commit '598f0909568a51de8a2d1148f55a644fd8dffad0' into sync_cg_clif-2023-01-24
[rust.git] / tests / ui / parser / method-call-on-struct-literal-in-if-condition.stderr
1 error: invalid struct literal
2   --> $DIR/method-call-on-struct-literal-in-if-condition.rs:10:8
3    |
4 LL |     if Example { a: one(), }.is_pos() {
5    |        ^^^^^^^^^^^^^^^^^^^^^
6    |
7 help: you might need to surround the struct literal in parentheses
8    |
9 LL |     if (Example { a: one(), }).is_pos() {
10    |        +                     +
11
12 error: aborting due to previous error
13