fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

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