fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
340 B18 linesraw
1error: struct literals are not allowed here
2  --> $DIR/struct-literal-in-if.rs:12:8
3   |
4LL |       if Foo {
5   |  ________^
6LL | |         x: 3
7LL | |     }.hi() {
8   | |_____^
9   |
10help: surround the struct literal with parentheses
11   |
12LL |     if (Foo {
13LL |         x: 3
14LL |     }).hi() {
15   |
16
17error: aborting due to previous error
18