1 error[E0423]: expected value, found enum `n::Z`
2 --> $DIR/privacy-enum-ctor.rs:23:9
7 help: try using one of the enum's variants
16 error[E0423]: expected value, found enum `Z`
17 --> $DIR/privacy-enum-ctor.rs:25:9
20 | ------ similarly named function `f` defined here
25 help: a function with a similar name exists
29 help: try using one of the enum's variants
38 error[E0423]: expected value, found struct variant `Z::Struct`
39 --> $DIR/privacy-enum-ctor.rs:29:20
44 | |_____________- `Z::Struct` defined here
46 LL | let _: Z = Z::Struct;
47 | ^^^^^^^^^ did you mean `Z::Struct { /* fields */ }`?
49 error[E0423]: expected value, found enum `m::E`
50 --> $DIR/privacy-enum-ctor.rs:41:16
53 | ------ similarly named function `f` defined here
58 help: a function with a similar name exists
62 help: try using one of the enum's variants
64 LL | let _: E = E::Fn;
66 LL | let _: E = E::Struct;
68 LL | let _: E = E::Unit;
70 help: consider importing one of these items instead
72 LL | use std::f32::consts::E;
74 LL | use std::f64::consts::E;
77 error[E0423]: expected value, found struct variant `m::E::Struct`
78 --> $DIR/privacy-enum-ctor.rs:45:16
83 | |_________- `m::E::Struct` defined here
85 LL | let _: E = m::E::Struct;
86 | ^^^^^^^^^^^^ did you mean `m::E::Struct { /* fields */ }`?
88 error[E0423]: expected value, found enum `E`
89 --> $DIR/privacy-enum-ctor.rs:49:16
94 help: try using one of the enum's variants
96 LL | let _: E = E::Fn;
98 LL | let _: E = E::Struct;
100 LL | let _: E = E::Unit;
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 `E::Struct`
110 --> $DIR/privacy-enum-ctor.rs:53:16
115 | |_________- `E::Struct` defined here
117 LL | let _: E = E::Struct;
118 | ^^^^^^^^^ did you mean `E::Struct { /* fields */ }`?
120 error[E0412]: cannot find type `Z` in this scope
121 --> $DIR/privacy-enum-ctor.rs:57:12
124 | ---------- similarly named enum `E` defined here
126 LL | let _: Z = m::n::Z;
129 help: an enum with a similar name exists
131 LL | let _: E = m::n::Z;
133 help: consider importing this enum
138 error[E0423]: expected value, found enum `m::n::Z`
139 --> $DIR/privacy-enum-ctor.rs:57:16
141 LL | let _: Z = m::n::Z;
144 help: try using one of the enum's variants
146 LL | let _: Z = m::Z::Fn;
148 LL | let _: Z = m::Z::Struct;
150 LL | let _: Z = m::Z::Unit;
153 error[E0412]: cannot find type `Z` in this scope
154 --> $DIR/privacy-enum-ctor.rs:61:12
157 | ---------- similarly named enum `E` defined here
159 LL | let _: Z = m::n::Z::Fn;
162 help: an enum with a similar name exists
164 LL | let _: E = m::n::Z::Fn;
166 help: consider importing this enum
171 error[E0412]: cannot find type `Z` in this scope
172 --> $DIR/privacy-enum-ctor.rs:64:12
175 | ---------- similarly named enum `E` defined here
177 LL | let _: Z = m::n::Z::Struct;
180 help: an enum with a similar name exists
182 LL | let _: E = m::n::Z::Struct;
184 help: consider importing this enum
189 error[E0423]: expected value, found struct variant `m::n::Z::Struct`
190 --> $DIR/privacy-enum-ctor.rs:64:16
195 | |_____________- `m::n::Z::Struct` defined here
197 LL | let _: Z = m::n::Z::Struct;
198 | ^^^^^^^^^^^^^^^ did you mean `m::n::Z::Struct { /* fields */ }`?
200 error[E0412]: cannot find type `Z` in this scope
201 --> $DIR/privacy-enum-ctor.rs:68:12
204 | ---------- similarly named enum `E` defined here
206 LL | let _: Z = m::n::Z::Unit {};
209 help: an enum with a similar name exists
211 LL | let _: E = m::n::Z::Unit {};
213 help: consider importing this enum
218 error[E0603]: enum `Z` is private
219 --> $DIR/privacy-enum-ctor.rs:57:22
221 LL | let _: Z = m::n::Z;
224 note: the enum `Z` is defined here
225 --> $DIR/privacy-enum-ctor.rs:11:9
227 LL | pub(in m) enum Z {
230 error[E0603]: enum `Z` is private
231 --> $DIR/privacy-enum-ctor.rs:61:22
233 LL | let _: Z = m::n::Z::Fn;
236 note: the enum `Z` is defined here
237 --> $DIR/privacy-enum-ctor.rs:11:9
239 LL | pub(in m) enum Z {
242 error[E0603]: enum `Z` is private
243 --> $DIR/privacy-enum-ctor.rs:64:22
245 LL | let _: Z = m::n::Z::Struct;
248 note: the enum `Z` is defined here
249 --> $DIR/privacy-enum-ctor.rs:11:9
251 LL | pub(in m) enum Z {
254 error[E0603]: enum `Z` is private
255 --> $DIR/privacy-enum-ctor.rs:68:22
257 LL | let _: Z = m::n::Z::Unit {};
260 note: the enum `Z` is defined here
261 --> $DIR/privacy-enum-ctor.rs:11:9
263 LL | pub(in m) enum Z {
266 error[E0308]: mismatched types
267 --> $DIR/privacy-enum-ctor.rs:27:20
270 | ------ fn(u8) -> m::n::Z {m::n::Z::Fn} defined here
272 LL | let _: Z = Z::Fn;
273 | - ^^^^^ expected enum `m::n::Z`, found fn item
275 | expected due to this
277 = note: expected enum `m::n::Z`
278 found fn item `fn(u8) -> m::n::Z {m::n::Z::Fn}`
279 help: use parentheses to instantiate this tuple variant
281 LL | let _: Z = Z::Fn(_);
284 error[E0618]: expected function, found enum variant `Z::Unit`
285 --> $DIR/privacy-enum-ctor.rs:31:17
288 | ---- `Z::Unit` defined here
290 LL | let _ = Z::Unit();
293 | call expression requires function
295 help: `Z::Unit` is a unit variant, you need to write it without the parenthesis
297 LL | let _ = Z::Unit;
300 error[E0308]: mismatched types
301 --> $DIR/privacy-enum-ctor.rs:43:16
304 | ------ fn(u8) -> m::E {m::E::Fn} defined here
306 LL | let _: E = m::E::Fn;
307 | - ^^^^^^^^ expected enum `m::E`, found fn item
309 | expected due to this
311 = note: expected enum `m::E`
312 found fn item `fn(u8) -> m::E {m::E::Fn}`
313 help: use parentheses to instantiate this tuple variant
315 LL | let _: E = m::E::Fn(_);
318 error[E0618]: expected function, found enum variant `m::E::Unit`
319 --> $DIR/privacy-enum-ctor.rs:47:16
322 | ---- `m::E::Unit` defined here
324 LL | let _: E = m::E::Unit();
327 | call expression requires function
329 help: `m::E::Unit` is a unit variant, you need to write it without the parenthesis
331 LL | let _: E = m::E::Unit;
334 error[E0308]: mismatched types
335 --> $DIR/privacy-enum-ctor.rs:51:16
338 | ------ fn(u8) -> m::E {m::E::Fn} defined here
340 LL | let _: E = E::Fn;
341 | - ^^^^^ expected enum `m::E`, found fn item
343 | expected due to this
345 = note: expected enum `m::E`
346 found fn item `fn(u8) -> m::E {m::E::Fn}`
347 help: use parentheses to instantiate this tuple variant
349 LL | let _: E = E::Fn(_);
352 error[E0618]: expected function, found enum variant `E::Unit`
353 --> $DIR/privacy-enum-ctor.rs:55:16
356 | ---- `E::Unit` defined here
358 LL | let _: E = E::Unit();
361 | call expression requires function
363 help: `E::Unit` is a unit variant, you need to write it without the parenthesis
365 LL | let _: E = E::Unit;
368 error: aborting due to 23 previous errors
370 Some errors have detailed explanations: E0308, E0412, E0423, E0603, E0618.
371 For more information about an error, try `rustc --explain E0308`.