fork/rust

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

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

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