fork/rust

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

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

1.41.0
3.2 KiB88 linesraw
1error[E0423]: expected value, found struct `Empty1`
2  --> $DIR/empty-struct-braces-expr.rs:15:14
3   |
4LL | struct Empty1 {}
5   | ---------------- `Empty1` defined here
6...
7LL |     let e1 = Empty1;
8   |              ^^^^^^
9   |              |
10   |              did you mean `Empty1 { /* fields */ }`?
11   |              help: a unit struct with a similar name exists: `XEmpty2`
12
13error[E0423]: expected function, tuple struct or tuple variant, found struct `Empty1`
14  --> $DIR/empty-struct-braces-expr.rs:16:14
15   |
16LL | struct Empty1 {}
17   | ---------------- `Empty1` defined here
18...
19LL |     let e1 = Empty1();
20   |              ^^^^^^
21   |              |
22   |              did you mean `Empty1 { /* fields */ }`?
23   |              help: a unit struct with a similar name exists: `XEmpty2`
24
25error[E0423]: expected value, found struct variant `E::Empty3`
26  --> $DIR/empty-struct-braces-expr.rs:18:14
27   |
28LL |     Empty3 {}
29   |     --------- `E::Empty3` defined here
30...
31LL |     let e3 = E::Empty3;
32   |              ^^^^^^^^^ did you mean `E::Empty3 { /* fields */ }`?
33
34error[E0423]: expected function, tuple struct or tuple variant, found struct variant `E::Empty3`
35  --> $DIR/empty-struct-braces-expr.rs:19:14
36   |
37LL |     Empty3 {}
38   |     --------- `E::Empty3` defined here
39...
40LL |     let e3 = E::Empty3();
41   |              ^^^^^^^^^ did you mean `E::Empty3 { /* fields */ }`?
42
43error[E0423]: expected value, found struct `XEmpty1`
44  --> $DIR/empty-struct-braces-expr.rs:22:15
45   |
46LL |     let xe1 = XEmpty1;
47   |               ^^^^^^^
48   |               |
49   |               did you mean `XEmpty1 { /* fields */ }`?
50   |               help: a unit struct with a similar name exists: `XEmpty2`
51
52error[E0423]: expected function, tuple struct or tuple variant, found struct `XEmpty1`
53  --> $DIR/empty-struct-braces-expr.rs:23:15
54   |
55LL |     let xe1 = XEmpty1();
56   |               ^^^^^^^
57   |               |
58   |               did you mean `XEmpty1 { /* fields */ }`?
59   |               help: a unit struct with a similar name exists: `XEmpty2`
60
61error[E0599]: no variant or associated item named `Empty3` found for type `empty_struct::XE` in the current scope
62  --> $DIR/empty-struct-braces-expr.rs:25:19
63   |
64LL |     let xe3 = XE::Empty3;
65   |                   ^^^^^^
66   |                   |
67   |                   variant or associated item not found in `empty_struct::XE`
68   |                   help: there is a variant with a similar name: `XEmpty3`
69
70error[E0599]: no variant or associated item named `Empty3` found for type `empty_struct::XE` in the current scope
71  --> $DIR/empty-struct-braces-expr.rs:26:19
72   |
73LL |     let xe3 = XE::Empty3();
74   |                   ^^^^^^
75   |                   |
76   |                   variant or associated item not found in `empty_struct::XE`
77   |                   help: there is a variant with a similar name: `XEmpty3`
78
79error: no variant `Empty1` in enum `empty_struct::XE`
80  --> $DIR/empty-struct-braces-expr.rs:28:9
81   |
82LL |     XE::Empty1 {};
83   |         ^^^^^^ help: there is a variant with a similar name: `XEmpty3`
84
85error: aborting due to 9 previous errors
86
87Some errors have detailed explanations: E0423, E0599.
88For more information about an error, try `rustc --explain E0423`.