blob: 8b72469fcf5827e91b4195eda7cc317f282700a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
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: struct literals are not allowed here
--> $DIR/struct-literal-in-if.rs:17:19
|
LL | if let true = Foo {
| ___________________^
LL | | x: 3
LL | | }.hi() {
| |_____^
|
help: surround the struct literal with parentheses
|
LL ~ if let true = (Foo {
LL | x: 3
LL ~ }).hi() {
|
error: aborting due to 2 previous errors
|