1 error[E0423]: expected value, found enum `n::Z`
2 --> $DIR/privacy-enum-ctor.rs:23:9
7 note: the enum is defined here
8 --> $DIR/privacy-enum-ctor.rs:11:9
10 LL | / pub(in m) enum Z {
18 help: you might have meant to use the following enum variant
22 help: alternatively, the following enum variants are also available
24 LL | (m::Z::Fn(/* fields */));
25 | ~~~~~~~~~~~~~~~~~~~~~~~~
26 LL | (m::Z::Struct { /* fields */ });
27 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29 error[E0423]: expected value, found enum `Z`
30 --> $DIR/privacy-enum-ctor.rs:25:9
35 note: the enum is defined here
36 --> $DIR/privacy-enum-ctor.rs:11:9
38 LL | / pub(in m) enum Z {
46 help: you might have meant to use the following enum variant
50 help: alternatively, the following enum variants are also available
52 LL | (m::Z::Fn(/* fields */));
53 | ~~~~~~~~~~~~~~~~~~~~~~~~
54 LL | (m::Z::Struct { /* fields */ });
55 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 error[E0423]: expected value, found struct variant `Z::Struct`
58 --> $DIR/privacy-enum-ctor.rs:29:20
63 | |_____________- `Z::Struct` defined here
65 LL | let _: Z = Z::Struct;
66 | ^^^^^^^^^ help: use struct literal syntax instead: `Z::Struct { s: val }`
68 error[E0423]: expected value, found enum `m::E`
69 --> $DIR/privacy-enum-ctor.rs:41:16
72 | ------ similarly named function `f` defined here
77 note: the enum is defined here
78 --> $DIR/privacy-enum-ctor.rs:2:5
88 help: you might have meant to use the following enum variant
90 LL | let _: E = E::Unit;
92 help: alternatively, the following enum variants are also available
94 LL | let _: E = (E::Fn(/* fields */));
95 | ~~~~~~~~~~~~~~~~~~~~~
96 LL | let _: E = (E::Struct { /* fields */ });
97 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98 help: a function with a similar name exists
100 LL | let _: E = m::f;
102 help: consider importing one of these items instead
104 LL | use std::f32::consts::E;
106 LL | use std::f64::consts::E;
108 help: if you import `E`, refer to it directly
110 LL - let _: E = m::E;
114 error[E0423]: expected value, found struct variant `m::E::Struct`
115 --> $DIR/privacy-enum-ctor.rs:45:16
120 | |_________- `m::E::Struct` defined here
122 LL | let _: E = m::E::Struct;
123 | ^^^^^^^^^^^^ help: use struct literal syntax instead: `m::E::Struct { s: val }`
125 error[E0423]: expected value, found enum `E`
126 --> $DIR/privacy-enum-ctor.rs:49:16
131 note: the enum is defined here
132 --> $DIR/privacy-enum-ctor.rs:2:5
142 help: you might have meant to use the following enum variant
144 LL | let _: E = E::Unit;
146 help: alternatively, the following enum variants are also available
148 LL | let _: E = (E::Fn(/* fields */));
149 | ~~~~~~~~~~~~~~~~~~~~~
150 LL | let _: E = (E::Struct { /* fields */ });
151 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152 help: consider importing one of these items instead
154 LL | use std::f32::consts::E;
156 LL | use std::f64::consts::E;
159 error[E0423]: expected value, found struct variant `E::Struct`
160 --> $DIR/privacy-enum-ctor.rs:53:16
165 | |_________- `E::Struct` defined here
167 LL | let _: E = E::Struct;
168 | ^^^^^^^^^ help: use struct literal syntax instead: `E::Struct { s: val }`
170 error[E0412]: cannot find type `Z` in this scope
171 --> $DIR/privacy-enum-ctor.rs:57:12
174 | ---------- similarly named enum `E` defined here
176 LL | let _: Z = m::n::Z;
177 | ^ help: an enum with a similar name exists: `E`
179 note: enum `m::Z` exists but is inaccessible
180 --> $DIR/privacy-enum-ctor.rs:11:9
182 LL | pub(in m) enum Z {
183 | ^^^^^^^^^^^^^^^^ not accessible
185 error[E0423]: expected value, found enum `m::n::Z`
186 --> $DIR/privacy-enum-ctor.rs:57:16
188 LL | let _: Z = m::n::Z;
191 note: the enum is defined here
192 --> $DIR/privacy-enum-ctor.rs:11:9
194 LL | / pub(in m) enum Z {
202 help: you might have meant to use the following enum variant
204 LL | let _: Z = m::Z::Unit;
206 help: alternatively, the following enum variants are also available
208 LL | let _: Z = (m::Z::Fn(/* fields */));
209 | ~~~~~~~~~~~~~~~~~~~~~~~~
210 LL | let _: Z = (m::Z::Struct { /* fields */ });
211 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
213 error[E0412]: cannot find type `Z` in this scope
214 --> $DIR/privacy-enum-ctor.rs:61:12
217 | ---------- similarly named enum `E` defined here
219 LL | let _: Z = m::n::Z::Fn;
220 | ^ help: an enum with a similar name exists: `E`
222 note: enum `m::Z` exists but is inaccessible
223 --> $DIR/privacy-enum-ctor.rs:11:9
225 LL | pub(in m) enum Z {
226 | ^^^^^^^^^^^^^^^^ not accessible
228 error[E0412]: cannot find type `Z` in this scope
229 --> $DIR/privacy-enum-ctor.rs:64:12
232 | ---------- similarly named enum `E` defined here
234 LL | let _: Z = m::n::Z::Struct;
235 | ^ help: an enum with a similar name exists: `E`
237 note: enum `m::Z` exists but is inaccessible
238 --> $DIR/privacy-enum-ctor.rs:11:9
240 LL | pub(in m) enum Z {
241 | ^^^^^^^^^^^^^^^^ not accessible
243 error[E0423]: expected value, found struct variant `m::n::Z::Struct`
244 --> $DIR/privacy-enum-ctor.rs:64:16
249 | |_____________- `m::n::Z::Struct` defined here
251 LL | let _: Z = m::n::Z::Struct;
252 | ^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `m::n::Z::Struct { s: val }`
254 error[E0412]: cannot find type `Z` in this scope
255 --> $DIR/privacy-enum-ctor.rs:68:12
258 | ---------- similarly named enum `E` defined here
260 LL | let _: Z = m::n::Z::Unit {};
261 | ^ help: an enum with a similar name exists: `E`
263 note: enum `m::Z` exists but is inaccessible
264 --> $DIR/privacy-enum-ctor.rs:11:9
266 LL | pub(in m) enum Z {
267 | ^^^^^^^^^^^^^^^^ not accessible
269 error[E0603]: enum `Z` is private
270 --> $DIR/privacy-enum-ctor.rs:57:22
272 LL | let _: Z = m::n::Z;
275 note: the enum `Z` is defined here
276 --> $DIR/privacy-enum-ctor.rs:11:9
278 LL | pub(in m) enum Z {
281 error[E0603]: enum `Z` is private
282 --> $DIR/privacy-enum-ctor.rs:61:22
284 LL | let _: Z = m::n::Z::Fn;
287 note: the enum `Z` is defined here
288 --> $DIR/privacy-enum-ctor.rs:11:9
290 LL | pub(in m) enum Z {
293 error[E0603]: enum `Z` is private
294 --> $DIR/privacy-enum-ctor.rs:64:22
296 LL | let _: Z = m::n::Z::Struct;
299 note: the enum `Z` is defined here
300 --> $DIR/privacy-enum-ctor.rs:11:9
302 LL | pub(in m) enum Z {
305 error[E0603]: enum `Z` is private
306 --> $DIR/privacy-enum-ctor.rs:68:22
308 LL | let _: Z = m::n::Z::Unit {};
311 note: the enum `Z` is defined here
312 --> $DIR/privacy-enum-ctor.rs:11:9
314 LL | pub(in m) enum Z {
317 error[E0308]: mismatched types
318 --> $DIR/privacy-enum-ctor.rs:27:20
321 | -- fn(u8) -> Z {Z::Fn} defined here
323 LL | let _: Z = Z::Fn;
324 | - ^^^^^ expected enum `Z`, found fn item
326 | expected due to this
328 = note: expected enum `Z`
329 found fn item `fn(u8) -> Z {Z::Fn}`
330 help: use parentheses to construct this tuple variant
332 LL | let _: Z = Z::Fn(/* u8 */);
335 error[E0618]: expected function, found enum variant `Z::Unit`
336 --> $DIR/privacy-enum-ctor.rs:31:17
339 | ---- enum variant `Z::Unit` defined here
341 LL | let _ = Z::Unit();
344 | call expression requires function
346 help: `Z::Unit` is a unit enum variant, and does not take parentheses to be constructed
348 LL - let _ = Z::Unit();
349 LL + let _ = Z::Unit;
352 error[E0308]: mismatched types
353 --> $DIR/privacy-enum-ctor.rs:43:16
356 | -- fn(u8) -> E {E::Fn} defined here
358 LL | let _: E = m::E::Fn;
359 | - ^^^^^^^^ expected enum `E`, found fn item
361 | expected due to this
363 = note: expected enum `E`
364 found fn item `fn(u8) -> E {E::Fn}`
365 help: use parentheses to construct this tuple variant
367 LL | let _: E = m::E::Fn(/* u8 */);
370 error[E0618]: expected function, found enum variant `m::E::Unit`
371 --> $DIR/privacy-enum-ctor.rs:47:16
374 | ---- enum variant `m::E::Unit` defined here
376 LL | let _: E = m::E::Unit();
379 | call expression requires function
381 help: `m::E::Unit` is a unit enum variant, and does not take parentheses to be constructed
383 LL - let _: E = m::E::Unit();
384 LL + let _: E = m::E::Unit;
387 error[E0308]: mismatched types
388 --> $DIR/privacy-enum-ctor.rs:51:16
391 | -- fn(u8) -> E {E::Fn} defined here
393 LL | let _: E = E::Fn;
394 | - ^^^^^ expected enum `E`, found fn item
396 | expected due to this
398 = note: expected enum `E`
399 found fn item `fn(u8) -> E {E::Fn}`
400 help: use parentheses to construct this tuple variant
402 LL | let _: E = E::Fn(/* u8 */);
405 error[E0618]: expected function, found enum variant `E::Unit`
406 --> $DIR/privacy-enum-ctor.rs:55:16
409 | ---- enum variant `E::Unit` defined here
411 LL | let _: E = E::Unit();
414 | call expression requires function
416 help: `E::Unit` is a unit enum variant, and does not take parentheses to be constructed
418 LL - let _: E = E::Unit();
419 LL + let _: E = E::Unit;
422 error: aborting due to 23 previous errors
424 Some errors have detailed explanations: E0308, E0412, E0423, E0603, E0618.
425 For more information about an error, try `rustc --explain E0308`.