fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
678 B34 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: struct literals are not allowed here
18  --> $DIR/struct-literal-in-if.rs:17:19
19   |
20LL |       if let true = Foo {
21   |  ___________________^
22LL | |         x: 3
23LL | |     }.hi() {
24   | |_____^
25   |
26help: surround the struct literal with parentheses
27   |
28LL ~     if let true = (Foo {
29LL |         x: 3
30LL ~     }).hi() {
31   |
32
33error: aborting due to 2 previous errors
34