summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/struct-literal-in-if.stderr
blob: b5a9864bbc4c404352414526df5105bf92ac2fdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
error: struct literals are not allowed here
  --> $DIR/struct-literal-in-if.rs:12:8
   |
LL |       if Foo {
   |  ________^
LL | |         x: 3
LL | |     }.hi() {
   | |_____^
   |
help: surround the struct literal with parentheses
   |
LL ~     if (Foo {
LL |         x: 3
LL ~     }).hi() {
   |

error: aborting due to previous error