fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.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