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
25 LL | | // This is ok, it is equivalent to not having braces
27 | |_____- similarly named function `f` defined here
29 help: a function with a similar name exists
33 help: try using one of the enum's variants
42 error[E0423]: expected value, found struct variant `Z::Struct`
43 --> $DIR/privacy-enum-ctor.rs:29:20
48 | |_____________- `Z::Struct` defined here
50 LL | let _: Z = Z::Struct;
51 | ^^^^^^^^^ did you mean `Z::Struct { /* fields */ }`?
53 error[E0423]: expected value, found enum `m::E`
54 --> $DIR/privacy-enum-ctor.rs:41:16
61 LL | | // This is ok, it is equivalent to not having braces
63 | |_____- similarly named function `f` defined here
68 help: a function with a similar name exists
72 help: try using one of the enum's variants
74 LL | let _: E = E::Fn;
76 LL | let _: E = E::Struct;
78 LL | let _: E = E::Unit;
80 help: possible better candidates are found in other modules, you can import them into scope
82 LL | use std::f32::consts::E;
84 LL | use std::f64::consts::E;
87 error[E0423]: expected value, found struct variant `m::E::Struct`
88 --> $DIR/privacy-enum-ctor.rs:45:16
93 | |_________- `m::E::Struct` defined here
95 LL | let _: E = m::E::Struct;
96 | ^^^^^^^^^^^^ did you mean `m::E::Struct { /* fields */ }`?
98 error[E0423]: expected value, found enum `E`
99 --> $DIR/privacy-enum-ctor.rs:49:16
104 help: try using one of the enum's variants
106 LL | let _: E = E::Fn;
108 LL | let _: E = E::Struct;
110 LL | let _: E = E::Unit;
112 help: possible better candidates are found in other modules, you can import them into scope
114 LL | use std::f32::consts::E;
116 LL | use std::f64::consts::E;
119 error[E0423]: expected value, found struct variant `E::Struct`
120 --> $DIR/privacy-enum-ctor.rs:53:16
125 | |_________- `E::Struct` defined here
127 LL | let _: E = E::Struct;
128 | ^^^^^^^^^ did you mean `E::Struct { /* fields */ }`?
130 error[E0412]: cannot find type `Z` in this scope
131 --> $DIR/privacy-enum-ctor.rs:57:12
140 | |_____- similarly named enum `E` defined here
142 LL | let _: Z = m::n::Z;
145 help: an enum with a similar name exists
147 LL | let _: E = m::n::Z;
149 help: possible candidate is found in another module, you can import it into scope
154 error[E0423]: expected value, found enum `m::n::Z`
155 --> $DIR/privacy-enum-ctor.rs:57:16
157 LL | let _: Z = m::n::Z;
160 help: try using one of the enum's variants
162 LL | let _: Z = m::Z::Fn;
164 LL | let _: Z = m::Z::Struct;
166 LL | let _: Z = m::Z::Unit;
169 error[E0412]: cannot find type `Z` in this scope
170 --> $DIR/privacy-enum-ctor.rs:61:12
179 | |_____- similarly named enum `E` defined here
181 LL | let _: Z = m::n::Z::Fn;
184 help: an enum with a similar name exists
186 LL | let _: E = m::n::Z::Fn;
188 help: possible candidate is found in another module, you can import it into scope
193 error[E0412]: cannot find type `Z` in this scope
194 --> $DIR/privacy-enum-ctor.rs:64:12
203 | |_____- similarly named enum `E` defined here
205 LL | let _: Z = m::n::Z::Struct;
208 help: an enum with a similar name exists
210 LL | let _: E = m::n::Z::Struct;
212 help: possible candidate is found in another module, you can import it into scope
217 error[E0423]: expected value, found struct variant `m::n::Z::Struct`
218 --> $DIR/privacy-enum-ctor.rs:64:16
223 | |_____________- `m::n::Z::Struct` defined here
225 LL | let _: Z = m::n::Z::Struct;
226 | ^^^^^^^^^^^^^^^ did you mean `m::n::Z::Struct { /* fields */ }`?
228 error[E0412]: cannot find type `Z` in this scope
229 --> $DIR/privacy-enum-ctor.rs:68:12
238 | |_____- similarly named enum `E` defined here
240 LL | let _: Z = m::n::Z::Unit {};
243 help: an enum with a similar name exists
245 LL | let _: E = m::n::Z::Unit {};
247 help: possible candidate is found in another module, you can import it into scope
252 error[E0603]: enum `Z` is private
253 --> $DIR/privacy-enum-ctor.rs:57:22
255 LL | let _: Z = m::n::Z;
258 error[E0603]: enum `Z` is private
259 --> $DIR/privacy-enum-ctor.rs:61:22
261 LL | let _: Z = m::n::Z::Fn;
264 error[E0603]: enum `Z` is private
265 --> $DIR/privacy-enum-ctor.rs:64:22
267 LL | let _: Z = m::n::Z::Struct;
270 error[E0603]: enum `Z` is private
271 --> $DIR/privacy-enum-ctor.rs:68:22
273 LL | let _: Z = m::n::Z::Unit {};
276 error[E0308]: mismatched types
277 --> $DIR/privacy-enum-ctor.rs:27:20
280 | ------ fn(u8) -> m::n::Z {m::n::Z::Fn} defined here
282 LL | let _: Z = Z::Fn;
285 | expected enum `m::n::Z`, found fn item
286 | help: use parentheses to instantiate this tuple variant: `Z::Fn(_)`
288 = note: expected type `m::n::Z`
289 found type `fn(u8) -> m::n::Z {m::n::Z::Fn}`
291 error[E0618]: expected function, found enum variant `Z::Unit`
292 --> $DIR/privacy-enum-ctor.rs:31:17
295 | ---- `Z::Unit` defined here
297 LL | let _ = Z::Unit();
300 | call expression requires function
302 help: `Z::Unit` is a unit variant, you need to write it without the parenthesis
304 LL | let _ = Z::Unit;
307 error[E0308]: mismatched types
308 --> $DIR/privacy-enum-ctor.rs:43:16
311 | ------ fn(u8) -> m::E {m::E::Fn} defined here
313 LL | let _: E = m::E::Fn;
316 | expected enum `m::E`, found fn item
317 | help: use parentheses to instantiate this tuple variant: `m::E::Fn(_)`
319 = note: expected type `m::E`
320 found type `fn(u8) -> m::E {m::E::Fn}`
322 error[E0618]: expected function, found enum variant `m::E::Unit`
323 --> $DIR/privacy-enum-ctor.rs:47:16
326 | ---- `m::E::Unit` defined here
328 LL | let _: E = m::E::Unit();
331 | call expression requires function
333 help: `m::E::Unit` is a unit variant, you need to write it without the parenthesis
335 LL | let _: E = m::E::Unit;
338 error[E0308]: mismatched types
339 --> $DIR/privacy-enum-ctor.rs:51:16
342 | ------ fn(u8) -> m::E {m::E::Fn} defined here
344 LL | let _: E = E::Fn;
347 | expected enum `m::E`, found fn item
348 | help: use parentheses to instantiate this tuple variant: `E::Fn(_)`
350 = note: expected type `m::E`
351 found type `fn(u8) -> m::E {m::E::Fn}`
353 error[E0618]: expected function, found enum variant `E::Unit`
354 --> $DIR/privacy-enum-ctor.rs:55:16
357 | ---- `E::Unit` defined here
359 LL | let _: E = E::Unit();
362 | call expression requires function
364 help: `E::Unit` is a unit variant, you need to write it without the parenthesis
366 LL | let _: E = E::Unit;
369 error: aborting due to 23 previous errors
371 Some errors have detailed explanations: E0308, E0412, E0423, E0603, E0618.
372 For more information about an error, try `rustc --explain E0308`.