]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/struct-literal-in-if.stderr
Merge commit 'c1664c50b27a51f7a78c93ba65558e7c33eabee6' into clippyup
[rust.git] / src / test / ui / parser / struct-literal-in-if.stderr
1 error: struct literals are not allowed here
2   --> $DIR/struct-literal-in-if.rs:12:8
3    |
4 LL |       if Foo {
5    |  ________^
6 LL | |         x: 3
7 LL | |     }.hi() {
8    | |_____^
9    |
10 help: surround the struct literal with parentheses
11    |
12 LL |     if (Foo {
13 LL |         x: 3
14 LL |     }).hi() {
15    |
16
17 error: aborting due to previous error
18