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;
172 | ^ help: an enum with a similar name exists: `E`
174 note: enum `m::Z` exists but is inaccessible
175 --> $DIR/privacy-enum-ctor.rs:11:9
177 LL | pub(in m) enum Z {
178 | ^^^^^^^^^^^^^^^^ not accessible
180 error[E0423]: expected value, found enum `m::n::Z`
181 --> $DIR/privacy-enum-ctor.rs:57:16
183 LL | let _: Z = m::n::Z;
186 note: the enum is defined here
187 --> $DIR/privacy-enum-ctor.rs:11:9
189 LL | / pub(in m) enum Z {
197 help: you might have meant to use the following enum variant
199 LL | let _: Z = m::Z::Unit;
201 help: the following enum variants are available
203 LL | let _: Z = (m::Z::Fn(/* fields */));
204 | ~~~~~~~~~~~~~~~~~~~~~~~~
205 LL | let _: Z = (m::Z::Struct { /* fields */ });
206 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
208 error[E0412]: cannot find type `Z` in this scope
209 --> $DIR/privacy-enum-ctor.rs:61:12
212 | ---------- similarly named enum `E` defined here
214 LL | let _: Z = m::n::Z::Fn;
215 | ^ help: an enum with a similar name exists: `E`
217 note: enum `m::Z` exists but is inaccessible
218 --> $DIR/privacy-enum-ctor.rs:11:9
220 LL | pub(in m) enum Z {
221 | ^^^^^^^^^^^^^^^^ not accessible
223 error[E0412]: cannot find type `Z` in this scope
224 --> $DIR/privacy-enum-ctor.rs:64:12
227 | ---------- similarly named enum `E` defined here
229 LL | let _: Z = m::n::Z::Struct;
230 | ^ help: an enum with a similar name exists: `E`
232 note: enum `m::Z` exists but is inaccessible
233 --> $DIR/privacy-enum-ctor.rs:11:9
235 LL | pub(in m) enum Z {
236 | ^^^^^^^^^^^^^^^^ not accessible
238 error[E0423]: expected value, found struct variant `m::n::Z::Struct`
239 --> $DIR/privacy-enum-ctor.rs:64:16
244 | |_____________- `m::n::Z::Struct` defined here
246 LL | let _: Z = m::n::Z::Struct;
247 | ^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `m::n::Z::Struct { s: val }`
249 error[E0412]: cannot find type `Z` in this scope
250 --> $DIR/privacy-enum-ctor.rs:68:12
253 | ---------- similarly named enum `E` defined here
255 LL | let _: Z = m::n::Z::Unit {};
256 | ^ help: an enum with a similar name exists: `E`
258 note: enum `m::Z` exists but is inaccessible
259 --> $DIR/privacy-enum-ctor.rs:11:9
261 LL | pub(in m) enum Z {
262 | ^^^^^^^^^^^^^^^^ not accessible
264 error[E0603]: enum `Z` is private
265 --> $DIR/privacy-enum-ctor.rs:57:22
267 LL | let _: Z = m::n::Z;
270 note: the enum `Z` is defined here
271 --> $DIR/privacy-enum-ctor.rs:11:9
273 LL | pub(in m) enum Z {
276 error[E0603]: enum `Z` is private
277 --> $DIR/privacy-enum-ctor.rs:61:22
279 LL | let _: Z = m::n::Z::Fn;
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:64:22
291 LL | let _: Z = m::n::Z::Struct;
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:68:22
303 LL | let _: Z = m::n::Z::Unit {};
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[E0308]: mismatched types
313 --> $DIR/privacy-enum-ctor.rs:27:20
316 | ------ fn(u8) -> Z {Z::Fn} defined here
318 LL | let _: Z = Z::Fn;
319 | - ^^^^^ expected enum `Z`, found fn item
321 | expected due to this
323 = note: expected enum `Z`
324 found fn item `fn(u8) -> Z {Z::Fn}`
325 help: use parentheses to instantiate this tuple variant
327 LL | let _: Z = Z::Fn(_);
330 error[E0618]: expected function, found enum variant `Z::Unit`
331 --> $DIR/privacy-enum-ctor.rs:31:17
334 | ---- `Z::Unit` defined here
336 LL | let _ = Z::Unit();
339 | call expression requires function
341 help: `Z::Unit` is a unit variant, you need to write it without the parentheses
343 LL - let _ = Z::Unit();
344 LL + let _ = Z::Unit;
347 error[E0308]: mismatched types
348 --> $DIR/privacy-enum-ctor.rs:43:16
351 | ------ fn(u8) -> E {E::Fn} defined here
353 LL | let _: E = m::E::Fn;
354 | - ^^^^^^^^ expected enum `E`, found fn item
356 | expected due to this
358 = note: expected enum `E`
359 found fn item `fn(u8) -> E {E::Fn}`
360 help: use parentheses to instantiate this tuple variant
362 LL | let _: E = m::E::Fn(_);
365 error[E0618]: expected function, found enum variant `m::E::Unit`
366 --> $DIR/privacy-enum-ctor.rs:47:16
369 | ---- `m::E::Unit` defined here
371 LL | let _: E = m::E::Unit();
374 | call expression requires function
376 help: `m::E::Unit` is a unit variant, you need to write it without the parentheses
378 LL - let _: E = m::E::Unit();
379 LL + let _: E = m::E::Unit;
382 error[E0308]: mismatched types
383 --> $DIR/privacy-enum-ctor.rs:51:16
386 | ------ fn(u8) -> E {E::Fn} defined here
388 LL | let _: E = E::Fn;
389 | - ^^^^^ expected enum `E`, found fn item
391 | expected due to this
393 = note: expected enum `E`
394 found fn item `fn(u8) -> E {E::Fn}`
395 help: use parentheses to instantiate this tuple variant
397 LL | let _: E = E::Fn(_);
400 error[E0618]: expected function, found enum variant `E::Unit`
401 --> $DIR/privacy-enum-ctor.rs:55:16
404 | ---- `E::Unit` defined here
406 LL | let _: E = E::Unit();
409 | call expression requires function
411 help: `E::Unit` is a unit variant, you need to write it without the parentheses
413 LL - let _: E = E::Unit();
414 LL + let _: E = E::Unit;
417 error: aborting due to 23 previous errors
419 Some errors have detailed explanations: E0308, E0412, E0423, E0603, E0618.
420 For more information about an error, try `rustc --explain E0308`.