]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | error: struct literals are not allowed here |
2 | --> $DIR/struct-literal-in-if.rs:12:8 | |
532ac7d7 | 3 | | |
48663c56 XL |
4 | LL | if Foo { |
5 | | ________^ | |
6 | LL | | x: 3 | |
7 | LL | | }.hi() { | |
8 | | |_____^ | |
e74abb32 | 9 | | |
48663c56 | 10 | help: surround the struct literal with parentheses |
532ac7d7 | 11 | | |
48663c56 | 12 | LL | if (Foo { |
532ac7d7 | 13 | LL | x: 3 |
48663c56 | 14 | LL | }).hi() { |
0731742a | 15 | | |
0731742a | 16 | |
48663c56 | 17 | error: aborting due to previous error |
0bf4aa26 | 18 |