]>
Commit | Line | Data |
---|---|---|
2c00a5a8 | 1 | error[E0423]: expected value, found enum `n::Z` |
0731742a | 2 | --> $DIR/privacy-enum-ctor.rs:23:9 |
2c00a5a8 | 3 | | |
0531ce1d | 4 | LL | n::Z; |
2c00a5a8 | 5 | | ^^^^ |
e74abb32 | 6 | | |
29967ef6 XL |
7 | note: the enum is defined here |
8 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
9 | | | |
10 | LL | / pub(in m) enum Z { | |
11 | LL | | Fn(u8), | |
12 | LL | | Struct { | |
13 | LL | | s: u8, | |
14 | LL | | }, | |
15 | LL | | Unit, | |
16 | LL | | } | |
17 | | |_________^ | |
18 | help: you might have meant to use the following enum variant | |
532ac7d7 | 19 | | |
532ac7d7 | 20 | LL | m::Z::Unit; |
94222f64 | 21 | | ~~~~~~~~~~ |
487cf647 | 22 | help: alternatively, the following enum variant is available |
29967ef6 XL |
23 | | |
24 | LL | (m::Z::Fn(/* fields */)); | |
94222f64 | 25 | | ~~~~~~~~~~~~~~~~~~~~~~~~ |
2c00a5a8 XL |
26 | |
27 | error[E0423]: expected value, found enum `Z` | |
0731742a | 28 | --> $DIR/privacy-enum-ctor.rs:25:9 |
2c00a5a8 | 29 | | |
ba9703b0 XL |
30 | LL | Z; |
31 | | ^ | |
e74abb32 | 32 | | |
29967ef6 XL |
33 | note: the enum is defined here |
34 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
35 | | | |
36 | LL | / pub(in m) enum Z { | |
37 | LL | | Fn(u8), | |
38 | LL | | Struct { | |
39 | LL | | s: u8, | |
40 | LL | | }, | |
41 | LL | | Unit, | |
42 | LL | | } | |
43 | | |_________^ | |
44 | help: you might have meant to use the following enum variant | |
2c00a5a8 | 45 | | |
532ac7d7 | 46 | LL | m::Z::Unit; |
94222f64 | 47 | | ~~~~~~~~~~ |
487cf647 | 48 | help: alternatively, the following enum variant is available |
29967ef6 XL |
49 | | |
50 | LL | (m::Z::Fn(/* fields */)); | |
94222f64 | 51 | | ~~~~~~~~~~~~~~~~~~~~~~~~ |
2c00a5a8 XL |
52 | |
53 | error[E0423]: expected value, found enum `m::E` | |
0731742a | 54 | --> $DIR/privacy-enum-ctor.rs:41:16 |
2c00a5a8 | 55 | | |
ba9703b0 XL |
56 | LL | fn f() { |
57 | | ------ similarly named function `f` defined here | |
e74abb32 | 58 | ... |
ba9703b0 XL |
59 | LL | let _: E = m::E; |
60 | | ^^^^ | |
e74abb32 | 61 | | |
29967ef6 XL |
62 | note: the enum is defined here |
63 | --> $DIR/privacy-enum-ctor.rs:2:5 | |
64 | | | |
65 | LL | / pub enum E { | |
66 | LL | | Fn(u8), | |
67 | LL | | Struct { | |
68 | LL | | s: u8, | |
69 | LL | | }, | |
70 | LL | | Unit, | |
71 | LL | | } | |
72 | | |_____^ | |
73 | help: you might have meant to use the following enum variant | |
532ac7d7 | 74 | | |
532ac7d7 | 75 | LL | let _: E = E::Unit; |
94222f64 | 76 | | ~~~~~~~ |
487cf647 | 77 | help: alternatively, the following enum variant is available |
29967ef6 XL |
78 | | |
79 | LL | let _: E = (E::Fn(/* fields */)); | |
94222f64 | 80 | | ~~~~~~~~~~~~~~~~~~~~~ |
3dfed10e XL |
81 | help: a function with a similar name exists |
82 | | | |
83 | LL | let _: E = m::f; | |
94222f64 | 84 | | ~ |
f9f354fc | 85 | help: consider importing one of these items instead |
2c00a5a8 | 86 | | |
353b0b11 | 87 | LL + use std::f32::consts::E; |
2c00a5a8 | 88 | | |
353b0b11 | 89 | LL + use std::f64::consts::E; |
2c00a5a8 | 90 | | |
04454e1e FG |
91 | help: if you import `E`, refer to it directly |
92 | | | |
93 | LL - let _: E = m::E; | |
94 | LL + let _: E = E; | |
923072b8 | 95 | | |
2c00a5a8 | 96 | |
2c00a5a8 | 97 | error[E0423]: expected value, found enum `E` |
0731742a | 98 | --> $DIR/privacy-enum-ctor.rs:49:16 |
2c00a5a8 | 99 | | |
0531ce1d | 100 | LL | let _: E = E; |
2c00a5a8 | 101 | | ^ |
e74abb32 | 102 | | |
29967ef6 XL |
103 | note: the enum is defined here |
104 | --> $DIR/privacy-enum-ctor.rs:2:5 | |
105 | | | |
106 | LL | / pub enum E { | |
107 | LL | | Fn(u8), | |
108 | LL | | Struct { | |
109 | LL | | s: u8, | |
110 | LL | | }, | |
111 | LL | | Unit, | |
112 | LL | | } | |
113 | | |_____^ | |
114 | help: you might have meant to use the following enum variant | |
2c00a5a8 | 115 | | |
532ac7d7 | 116 | LL | let _: E = E::Unit; |
94222f64 | 117 | | ~~~~~~~ |
487cf647 | 118 | help: alternatively, the following enum variant is available |
29967ef6 XL |
119 | | |
120 | LL | let _: E = (E::Fn(/* fields */)); | |
94222f64 | 121 | | ~~~~~~~~~~~~~~~~~~~~~ |
f9f354fc | 122 | help: consider importing one of these items instead |
2c00a5a8 | 123 | | |
353b0b11 | 124 | LL + use std::f32::consts::E; |
2c00a5a8 | 125 | | |
353b0b11 | 126 | LL + use std::f64::consts::E; |
2c00a5a8 XL |
127 | | |
128 | ||
2c00a5a8 | 129 | error[E0412]: cannot find type `Z` in this scope |
0731742a | 130 | --> $DIR/privacy-enum-ctor.rs:57:12 |
2c00a5a8 | 131 | | |
ba9703b0 XL |
132 | LL | pub enum E { |
133 | | ---------- similarly named enum `E` defined here | |
e74abb32 | 134 | ... |
ba9703b0 | 135 | LL | let _: Z = m::n::Z; |
c295e0f8 | 136 | | ^ help: an enum with a similar name exists: `E` |
e74abb32 | 137 | | |
c295e0f8 XL |
138 | note: enum `m::Z` exists but is inaccessible |
139 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
2c00a5a8 | 140 | | |
c295e0f8 XL |
141 | LL | pub(in m) enum Z { |
142 | | ^^^^^^^^^^^^^^^^ not accessible | |
2c00a5a8 XL |
143 | |
144 | error[E0423]: expected value, found enum `m::n::Z` | |
0731742a | 145 | --> $DIR/privacy-enum-ctor.rs:57:16 |
2c00a5a8 | 146 | | |
0531ce1d | 147 | LL | let _: Z = m::n::Z; |
2c00a5a8 | 148 | | ^^^^^^^ |
e74abb32 | 149 | | |
29967ef6 XL |
150 | note: the enum is defined here |
151 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
152 | | | |
153 | LL | / pub(in m) enum Z { | |
154 | LL | | Fn(u8), | |
155 | LL | | Struct { | |
156 | LL | | s: u8, | |
157 | LL | | }, | |
158 | LL | | Unit, | |
159 | LL | | } | |
160 | | |_________^ | |
161 | help: you might have meant to use the following enum variant | |
532ac7d7 | 162 | | |
532ac7d7 | 163 | LL | let _: Z = m::Z::Unit; |
94222f64 | 164 | | ~~~~~~~~~~ |
487cf647 | 165 | help: alternatively, the following enum variant is available |
29967ef6 XL |
166 | | |
167 | LL | let _: Z = (m::Z::Fn(/* fields */)); | |
94222f64 | 168 | | ~~~~~~~~~~~~~~~~~~~~~~~~ |
2c00a5a8 XL |
169 | |
170 | error[E0412]: cannot find type `Z` in this scope | |
0731742a | 171 | --> $DIR/privacy-enum-ctor.rs:61:12 |
2c00a5a8 | 172 | | |
ba9703b0 XL |
173 | LL | pub enum E { |
174 | | ---------- similarly named enum `E` defined here | |
e74abb32 | 175 | ... |
ba9703b0 | 176 | LL | let _: Z = m::n::Z::Fn; |
c295e0f8 | 177 | | ^ help: an enum with a similar name exists: `E` |
e74abb32 | 178 | | |
c295e0f8 XL |
179 | note: enum `m::Z` exists but is inaccessible |
180 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
2c00a5a8 | 181 | | |
c295e0f8 XL |
182 | LL | pub(in m) enum Z { |
183 | | ^^^^^^^^^^^^^^^^ not accessible | |
2c00a5a8 XL |
184 | |
185 | error[E0412]: cannot find type `Z` in this scope | |
0731742a | 186 | --> $DIR/privacy-enum-ctor.rs:64:12 |
2c00a5a8 | 187 | | |
ba9703b0 XL |
188 | LL | pub enum E { |
189 | | ---------- similarly named enum `E` defined here | |
e74abb32 | 190 | ... |
ba9703b0 | 191 | LL | let _: Z = m::n::Z::Struct; |
c295e0f8 | 192 | | ^ help: an enum with a similar name exists: `E` |
e74abb32 | 193 | | |
c295e0f8 XL |
194 | note: enum `m::Z` exists but is inaccessible |
195 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
2c00a5a8 | 196 | | |
c295e0f8 XL |
197 | LL | pub(in m) enum Z { |
198 | | ^^^^^^^^^^^^^^^^ not accessible | |
2c00a5a8 | 199 | |
2c00a5a8 | 200 | error[E0412]: cannot find type `Z` in this scope |
0731742a | 201 | --> $DIR/privacy-enum-ctor.rs:68:12 |
2c00a5a8 | 202 | | |
ba9703b0 XL |
203 | LL | pub enum E { |
204 | | ---------- similarly named enum `E` defined here | |
e74abb32 | 205 | ... |
ba9703b0 | 206 | LL | let _: Z = m::n::Z::Unit {}; |
c295e0f8 | 207 | | ^ help: an enum with a similar name exists: `E` |
e74abb32 | 208 | | |
c295e0f8 XL |
209 | note: enum `m::Z` exists but is inaccessible |
210 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
2c00a5a8 | 211 | | |
c295e0f8 XL |
212 | LL | pub(in m) enum Z { |
213 | | ^^^^^^^^^^^^^^^^ not accessible | |
2c00a5a8 XL |
214 | |
215 | error[E0603]: enum `Z` is private | |
0731742a | 216 | --> $DIR/privacy-enum-ctor.rs:57:22 |
2c00a5a8 | 217 | | |
0531ce1d | 218 | LL | let _: Z = m::n::Z; |
ba9703b0 | 219 | | ^ private enum |
dfeec247 XL |
220 | | |
221 | note: the enum `Z` is defined here | |
222 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
223 | | | |
224 | LL | pub(in m) enum Z { | |
225 | | ^^^^^^^^^^^^^^^^ | |
2c00a5a8 XL |
226 | |
227 | error[E0603]: enum `Z` is private | |
0731742a | 228 | --> $DIR/privacy-enum-ctor.rs:61:22 |
2c00a5a8 | 229 | | |
0531ce1d | 230 | LL | let _: Z = m::n::Z::Fn; |
ba9703b0 | 231 | | ^ private enum |
dfeec247 XL |
232 | | |
233 | note: the enum `Z` is defined here | |
234 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
235 | | | |
236 | LL | pub(in m) enum Z { | |
237 | | ^^^^^^^^^^^^^^^^ | |
2c00a5a8 XL |
238 | |
239 | error[E0603]: enum `Z` is private | |
0731742a | 240 | --> $DIR/privacy-enum-ctor.rs:64:22 |
2c00a5a8 | 241 | | |
0531ce1d | 242 | LL | let _: Z = m::n::Z::Struct; |
ba9703b0 | 243 | | ^ private enum |
dfeec247 XL |
244 | | |
245 | note: the enum `Z` is defined here | |
246 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
247 | | | |
248 | LL | pub(in m) enum Z { | |
249 | | ^^^^^^^^^^^^^^^^ | |
2c00a5a8 XL |
250 | |
251 | error[E0603]: enum `Z` is private | |
0731742a | 252 | --> $DIR/privacy-enum-ctor.rs:68:22 |
2c00a5a8 | 253 | | |
0531ce1d | 254 | LL | let _: Z = m::n::Z::Unit {}; |
ba9703b0 | 255 | | ^ private enum |
dfeec247 XL |
256 | | |
257 | note: the enum `Z` is defined here | |
258 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
259 | | | |
260 | LL | pub(in m) enum Z { | |
261 | | ^^^^^^^^^^^^^^^^ | |
2c00a5a8 XL |
262 | |
263 | error[E0308]: mismatched types | |
0731742a | 264 | --> $DIR/privacy-enum-ctor.rs:27:20 |
2c00a5a8 | 265 | | |
416331ca | 266 | LL | Fn(u8), |
9c376795 | 267 | | -- `Fn` defines an enum variant constructor here, which should be called |
416331ca | 268 | ... |
0531ce1d | 269 | LL | let _: Z = Z::Fn; |
9ffffee4 | 270 | | - ^^^^^ expected `Z`, found enum constructor |
ba9703b0 | 271 | | | |
60c5eb7d XL |
272 | | expected due to this |
273 | | | |
9c376795 FG |
274 | = note: expected enum `Z` |
275 | found enum constructor `fn(u8) -> Z {Z::Fn}` | |
2b03887a | 276 | help: use parentheses to construct this tuple variant |
ba9703b0 | 277 | | |
f2b60f7d FG |
278 | LL | let _: Z = Z::Fn(/* u8 */); |
279 | | ++++++++++ | |
2c00a5a8 | 280 | |
487cf647 FG |
281 | error[E0533]: expected value, found struct variant `Z::Struct` |
282 | --> $DIR/privacy-enum-ctor.rs:29:20 | |
283 | | | |
284 | LL | let _: Z = Z::Struct; | |
285 | | ^^^^^^^^^ not a value | |
286 | ||
2c00a5a8 | 287 | error[E0618]: expected function, found enum variant `Z::Unit` |
0731742a | 288 | --> $DIR/privacy-enum-ctor.rs:31:17 |
2c00a5a8 | 289 | | |
0531ce1d | 290 | LL | Unit, |
064997fb | 291 | | ---- enum variant `Z::Unit` defined here |
2c00a5a8 | 292 | ... |
0531ce1d | 293 | LL | let _ = Z::Unit(); |
a1dfa0c6 XL |
294 | | ^^^^^^^-- |
295 | | | | |
296 | | call expression requires function | |
e74abb32 | 297 | | |
064997fb | 298 | help: `Z::Unit` is a unit enum variant, and does not take parentheses to be constructed |
2c00a5a8 | 299 | | |
3c0e092e XL |
300 | LL - let _ = Z::Unit(); |
301 | LL + let _ = Z::Unit; | |
923072b8 | 302 | | |
2c00a5a8 XL |
303 | |
304 | error[E0308]: mismatched types | |
0731742a | 305 | --> $DIR/privacy-enum-ctor.rs:43:16 |
2c00a5a8 | 306 | | |
416331ca | 307 | LL | Fn(u8), |
9c376795 | 308 | | -- `Fn` defines an enum variant constructor here, which should be called |
416331ca | 309 | ... |
0531ce1d | 310 | LL | let _: E = m::E::Fn; |
9ffffee4 | 311 | | - ^^^^^^^^ expected `E`, found enum constructor |
ba9703b0 | 312 | | | |
60c5eb7d XL |
313 | | expected due to this |
314 | | | |
9c376795 FG |
315 | = note: expected enum `E` |
316 | found enum constructor `fn(u8) -> E {E::Fn}` | |
2b03887a | 317 | help: use parentheses to construct this tuple variant |
ba9703b0 | 318 | | |
f2b60f7d FG |
319 | LL | let _: E = m::E::Fn(/* u8 */); |
320 | | ++++++++++ | |
2c00a5a8 | 321 | |
487cf647 FG |
322 | error[E0533]: expected value, found struct variant `m::E::Struct` |
323 | --> $DIR/privacy-enum-ctor.rs:45:16 | |
324 | | | |
325 | LL | let _: E = m::E::Struct; | |
326 | | ^^^^^^^^^^^^ not a value | |
327 | ||
2c00a5a8 | 328 | error[E0618]: expected function, found enum variant `m::E::Unit` |
0731742a | 329 | --> $DIR/privacy-enum-ctor.rs:47:16 |
2c00a5a8 | 330 | | |
0531ce1d | 331 | LL | Unit, |
064997fb | 332 | | ---- enum variant `m::E::Unit` defined here |
2c00a5a8 | 333 | ... |
0531ce1d | 334 | LL | let _: E = m::E::Unit(); |
a1dfa0c6 XL |
335 | | ^^^^^^^^^^-- |
336 | | | | |
337 | | call expression requires function | |
e74abb32 | 338 | | |
064997fb | 339 | help: `m::E::Unit` is a unit enum variant, and does not take parentheses to be constructed |
2c00a5a8 | 340 | | |
3c0e092e XL |
341 | LL - let _: E = m::E::Unit(); |
342 | LL + let _: E = m::E::Unit; | |
923072b8 | 343 | | |
2c00a5a8 XL |
344 | |
345 | error[E0308]: mismatched types | |
0731742a | 346 | --> $DIR/privacy-enum-ctor.rs:51:16 |
2c00a5a8 | 347 | | |
416331ca | 348 | LL | Fn(u8), |
9c376795 | 349 | | -- `Fn` defines an enum variant constructor here, which should be called |
416331ca | 350 | ... |
0531ce1d | 351 | LL | let _: E = E::Fn; |
9ffffee4 | 352 | | - ^^^^^ expected `E`, found enum constructor |
ba9703b0 | 353 | | | |
60c5eb7d XL |
354 | | expected due to this |
355 | | | |
9c376795 FG |
356 | = note: expected enum `E` |
357 | found enum constructor `fn(u8) -> E {E::Fn}` | |
2b03887a | 358 | help: use parentheses to construct this tuple variant |
ba9703b0 | 359 | | |
f2b60f7d FG |
360 | LL | let _: E = E::Fn(/* u8 */); |
361 | | ++++++++++ | |
2c00a5a8 | 362 | |
487cf647 FG |
363 | error[E0533]: expected value, found struct variant `E::Struct` |
364 | --> $DIR/privacy-enum-ctor.rs:53:16 | |
365 | | | |
366 | LL | let _: E = E::Struct; | |
367 | | ^^^^^^^^^ not a value | |
368 | ||
2c00a5a8 | 369 | error[E0618]: expected function, found enum variant `E::Unit` |
0731742a | 370 | --> $DIR/privacy-enum-ctor.rs:55:16 |
2c00a5a8 | 371 | | |
0531ce1d | 372 | LL | Unit, |
064997fb | 373 | | ---- enum variant `E::Unit` defined here |
2c00a5a8 | 374 | ... |
0531ce1d | 375 | LL | let _: E = E::Unit(); |
a1dfa0c6 XL |
376 | | ^^^^^^^-- |
377 | | | | |
378 | | call expression requires function | |
e74abb32 | 379 | | |
064997fb | 380 | help: `E::Unit` is a unit enum variant, and does not take parentheses to be constructed |
2c00a5a8 | 381 | | |
3c0e092e XL |
382 | LL - let _: E = E::Unit(); |
383 | LL + let _: E = E::Unit; | |
923072b8 | 384 | | |
2c00a5a8 | 385 | |
487cf647 FG |
386 | error[E0533]: expected value, found struct variant `m::n::Z::Struct` |
387 | --> $DIR/privacy-enum-ctor.rs:64:16 | |
388 | | | |
389 | LL | let _: Z = m::n::Z::Struct; | |
390 | | ^^^^^^^^^^^^^^^ not a value | |
391 | ||
2c00a5a8 XL |
392 | error: aborting due to 23 previous errors |
393 | ||
487cf647 | 394 | Some errors have detailed explanations: E0308, E0412, E0423, E0533, E0603, E0618. |
0531ce1d | 395 | For more information about an error, try `rustc --explain E0308`. |