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: the following enum variants are 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: the following enum variants are 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: the following enum variants are 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;
109 error[E0423]: expected value, found struct variant `m::E::Struct`
110 --> $DIR/privacy-enum-ctor.rs:45:16
115 | |_________- `m::E::Struct` defined here
117 LL | let _: E = m::E::Struct;
118 | ^^^^^^^^^^^^ help: use struct literal syntax instead: `m::E::Struct { s: val }`
120 error[E0423]: expected value, found enum `E`
121 --> $DIR/privacy-enum-ctor.rs:49:16
126 note: the enum is defined here
127 --> $DIR/privacy-enum-ctor.rs:2:5
137 help: you might have meant to use the following enum variant
139 LL | let _: E = E::Unit;
141 help: the following enum variants are available
143 LL | let _: E = (E::Fn(/* fields */));
144 | ~~~~~~~~~~~~~~~~~~~~~
145 LL | let _: E = (E::Struct { /* fields */ });
146 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147 help: consider importing one of these items instead
149 LL | use std::f32::consts::E;
151 LL | use std::f64::consts::E;
154 error[E0423]: expected value, found struct variant `E::Struct`
155 --> $DIR/privacy-enum-ctor.rs:53:16
160 | |_________- `E::Struct` defined here
162 LL | let _: E = E::Struct;
163 | ^^^^^^^^^ help: use struct literal syntax instead: `E::Struct { s: val }`
165 error[E0412]: cannot find type `Z` in this scope
166 --> $DIR/privacy-enum-ctor.rs:57:12
169 | ---------- similarly named enum `E` defined here
171 LL | let _: Z = m::n::Z;
174 help: an enum with a similar name exists
176 LL | let _: E = m::n::Z;
178 help: consider importing this enum
183 error[E0423]: expected value, found enum `m::n::Z`
184 --> $DIR/privacy-enum-ctor.rs:57:16
186 LL | let _: Z = m::n::Z;
189 note: the enum is defined here
190 --> $DIR/privacy-enum-ctor.rs:11:9
192 LL | / pub(in m) enum Z {
200 help: you might have meant to use the following enum variant
202 LL | let _: Z = m::Z::Unit;
204 help: the following enum variants are available
206 LL | let _: Z = (m::Z::Fn(/* fields */));
207 | ~~~~~~~~~~~~~~~~~~~~~~~~
208 LL | let _: Z = (m::Z::Struct { /* fields */ });
209 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
211 error[E0412]: cannot find type `Z` in this scope
212 --> $DIR/privacy-enum-ctor.rs:61:12
215 | ---------- similarly named enum `E` defined here
217 LL | let _: Z = m::n::Z::Fn;
220 help: an enum with a similar name exists
222 LL | let _: E = m::n::Z::Fn;
224 help: consider importing this enum
229 error[E0412]: cannot find type `Z` in this scope
230 --> $DIR/privacy-enum-ctor.rs:64:12
233 | ---------- similarly named enum `E` defined here
235 LL | let _: Z = m::n::Z::Struct;
238 help: an enum with a similar name exists
240 LL | let _: E = m::n::Z::Struct;
242 help: consider importing this enum
247 error[E0423]: expected value, found struct variant `m::n::Z::Struct`
248 --> $DIR/privacy-enum-ctor.rs:64:16
253 | |_____________- `m::n::Z::Struct` defined here
255 LL | let _: Z = m::n::Z::Struct;
256 | ^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `m::n::Z::Struct { s: val }`
258 error[E0412]: cannot find type `Z` in this scope
259 --> $DIR/privacy-enum-ctor.rs:68:12
262 | ---------- similarly named enum `E` defined here
264 LL | let _: Z = m::n::Z::Unit {};
267 help: an enum with a similar name exists
269 LL | let _: E = m::n::Z::Unit {};
271 help: consider importing this enum
276 error[E0603]: enum `Z` is private
277 --> $DIR/privacy-enum-ctor.rs:57:22
279 LL | let _: Z = m::n::Z;
282 note: the enum `Z` is defined here
283 --> $DIR/privacy-enum-ctor.rs:11:9
285 LL | pub(in m) enum Z {
288 error[E0603]: enum `Z` is private
289 --> $DIR/privacy-enum-ctor.rs:61:22
291 LL | let _: Z = m::n::Z::Fn;
294 note: the enum `Z` is defined here
295 --> $DIR/privacy-enum-ctor.rs:11:9
297 LL | pub(in m) enum Z {
300 error[E0603]: enum `Z` is private
301 --> $DIR/privacy-enum-ctor.rs:64:22
303 LL | let _: Z = m::n::Z::Struct;
306 note: the enum `Z` is defined here
307 --> $DIR/privacy-enum-ctor.rs:11:9
309 LL | pub(in m) enum Z {
312 error[E0603]: enum `Z` is private
313 --> $DIR/privacy-enum-ctor.rs:68:22
315 LL | let _: Z = m::n::Z::Unit {};
318 note: the enum `Z` is defined here
319 --> $DIR/privacy-enum-ctor.rs:11:9
321 LL | pub(in m) enum Z {
324 error[E0308]: mismatched types
325 --> $DIR/privacy-enum-ctor.rs:27:20
328 | ------ fn(u8) -> Z {Z::Fn} defined here
330 LL | let _: Z = Z::Fn;
331 | - ^^^^^ expected enum `Z`, found fn item
333 | expected due to this
335 = note: expected enum `Z`
336 found fn item `fn(u8) -> Z {Z::Fn}`
337 help: use parentheses to instantiate this tuple variant
339 LL | let _: Z = Z::Fn(_);
342 error[E0618]: expected function, found enum variant `Z::Unit`
343 --> $DIR/privacy-enum-ctor.rs:31:17
346 | ---- `Z::Unit` defined here
348 LL | let _ = Z::Unit();
351 | call expression requires function
353 help: `Z::Unit` is a unit variant, you need to write it without the parenthesis
355 LL | let _ = Z::Unit;
358 error[E0308]: mismatched types
359 --> $DIR/privacy-enum-ctor.rs:43:16
362 | ------ fn(u8) -> E {E::Fn} defined here
364 LL | let _: E = m::E::Fn;
365 | - ^^^^^^^^ expected enum `E`, found fn item
367 | expected due to this
369 = note: expected enum `E`
370 found fn item `fn(u8) -> E {E::Fn}`
371 help: use parentheses to instantiate this tuple variant
373 LL | let _: E = m::E::Fn(_);
376 error[E0618]: expected function, found enum variant `m::E::Unit`
377 --> $DIR/privacy-enum-ctor.rs:47:16
380 | ---- `m::E::Unit` defined here
382 LL | let _: E = m::E::Unit();
385 | call expression requires function
387 help: `m::E::Unit` is a unit variant, you need to write it without the parenthesis
389 LL | let _: E = m::E::Unit;
392 error[E0308]: mismatched types
393 --> $DIR/privacy-enum-ctor.rs:51:16
396 | ------ fn(u8) -> E {E::Fn} defined here
398 LL | let _: E = E::Fn;
399 | - ^^^^^ expected enum `E`, found fn item
401 | expected due to this
403 = note: expected enum `E`
404 found fn item `fn(u8) -> E {E::Fn}`
405 help: use parentheses to instantiate this tuple variant
407 LL | let _: E = E::Fn(_);
410 error[E0618]: expected function, found enum variant `E::Unit`
411 --> $DIR/privacy-enum-ctor.rs:55:16
414 | ---- `E::Unit` defined here
416 LL | let _: E = E::Unit();
419 | call expression requires function
421 help: `E::Unit` is a unit variant, you need to write it without the parenthesis
423 LL | let _: E = E::Unit;
426 error: aborting due to 23 previous errors
428 Some errors have detailed explanations: E0308, E0412, E0423, E0603, E0618.
429 For more information about an error, try `rustc --explain E0308`.