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 variant is available
24 LL | (m::Z::Fn(/* fields */));
25 | ~~~~~~~~~~~~~~~~~~~~~~~~
27 error[E0423]: expected value, found enum `Z`
28 --> $DIR/privacy-enum-ctor.rs:25:9
33 note: the enum is defined here
34 --> $DIR/privacy-enum-ctor.rs:11:9
36 LL | / pub(in m) enum Z {
44 help: you might have meant to use the following enum variant
48 help: alternatively, the following enum variant is available
50 LL | (m::Z::Fn(/* fields */));
51 | ~~~~~~~~~~~~~~~~~~~~~~~~
53 error[E0423]: expected value, found enum `m::E`
54 --> $DIR/privacy-enum-ctor.rs:41:16
57 | ------ similarly named function `f` defined here
62 note: the enum is defined here
63 --> $DIR/privacy-enum-ctor.rs:2:5
73 help: you might have meant to use the following enum variant
75 LL | let _: E = E::Unit;
77 help: alternatively, the following enum variant is available
79 LL | let _: E = (E::Fn(/* fields */));
80 | ~~~~~~~~~~~~~~~~~~~~~
81 help: a function with a similar name exists
85 help: consider importing one of these items instead
87 LL | use std::f32::consts::E;
89 LL | use std::f64::consts::E;
91 help: if you import `E`, refer to it directly
97 error[E0423]: expected value, found enum `E`
98 --> $DIR/privacy-enum-ctor.rs:49:16
103 note: the enum is defined here
104 --> $DIR/privacy-enum-ctor.rs:2:5
114 help: you might have meant to use the following enum variant
116 LL | let _: E = E::Unit;
118 help: alternatively, the following enum variant is available
120 LL | let _: E = (E::Fn(/* fields */));
121 | ~~~~~~~~~~~~~~~~~~~~~
122 help: consider importing one of these items instead
124 LL | use std::f32::consts::E;
126 LL | use std::f64::consts::E;
129 error[E0412]: cannot find type `Z` in this scope
130 --> $DIR/privacy-enum-ctor.rs:57:12
133 | ---------- similarly named enum `E` defined here
135 LL | let _: Z = m::n::Z;
136 | ^ help: an enum with a similar name exists: `E`
138 note: enum `m::Z` exists but is inaccessible
139 --> $DIR/privacy-enum-ctor.rs:11:9
141 LL | pub(in m) enum Z {
142 | ^^^^^^^^^^^^^^^^ not accessible
144 error[E0423]: expected value, found enum `m::n::Z`
145 --> $DIR/privacy-enum-ctor.rs:57:16
147 LL | let _: Z = m::n::Z;
150 note: the enum is defined here
151 --> $DIR/privacy-enum-ctor.rs:11:9
153 LL | / pub(in m) enum Z {
161 help: you might have meant to use the following enum variant
163 LL | let _: Z = m::Z::Unit;
165 help: alternatively, the following enum variant is available
167 LL | let _: Z = (m::Z::Fn(/* fields */));
168 | ~~~~~~~~~~~~~~~~~~~~~~~~
170 error[E0412]: cannot find type `Z` in this scope
171 --> $DIR/privacy-enum-ctor.rs:61:12
174 | ---------- similarly named enum `E` defined here
176 LL | let _: Z = m::n::Z::Fn;
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[E0412]: cannot find type `Z` in this scope
186 --> $DIR/privacy-enum-ctor.rs:64:12
189 | ---------- similarly named enum `E` defined here
191 LL | let _: Z = m::n::Z::Struct;
192 | ^ help: an enum with a similar name exists: `E`
194 note: enum `m::Z` exists but is inaccessible
195 --> $DIR/privacy-enum-ctor.rs:11:9
197 LL | pub(in m) enum Z {
198 | ^^^^^^^^^^^^^^^^ not accessible
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 {};
207 | ^ help: an enum with a similar name exists: `E`
209 note: enum `m::Z` exists but is inaccessible
210 --> $DIR/privacy-enum-ctor.rs:11:9
212 LL | pub(in m) enum Z {
213 | ^^^^^^^^^^^^^^^^ not accessible
215 error[E0603]: enum `Z` is private
216 --> $DIR/privacy-enum-ctor.rs:57:22
218 LL | let _: Z = m::n::Z;
221 note: the enum `Z` is defined here
222 --> $DIR/privacy-enum-ctor.rs:11:9
224 LL | pub(in m) enum Z {
227 error[E0603]: enum `Z` is private
228 --> $DIR/privacy-enum-ctor.rs:61:22
230 LL | let _: Z = m::n::Z::Fn;
233 note: the enum `Z` is defined here
234 --> $DIR/privacy-enum-ctor.rs:11:9
236 LL | pub(in m) enum Z {
239 error[E0603]: enum `Z` is private
240 --> $DIR/privacy-enum-ctor.rs:64:22
242 LL | let _: Z = m::n::Z::Struct;
245 note: the enum `Z` is defined here
246 --> $DIR/privacy-enum-ctor.rs:11:9
248 LL | pub(in m) enum Z {
251 error[E0603]: enum `Z` is private
252 --> $DIR/privacy-enum-ctor.rs:68:22
254 LL | let _: Z = m::n::Z::Unit {};
257 note: the enum `Z` is defined here
258 --> $DIR/privacy-enum-ctor.rs:11:9
260 LL | pub(in m) enum Z {
263 error[E0308]: mismatched types
264 --> $DIR/privacy-enum-ctor.rs:27:20
267 | -- `Fn` defines an enum variant constructor here, which should be called
269 LL | let _: Z = Z::Fn;
270 | - ^^^^^ expected enum `Z`, found enum constructor
272 | expected due to this
274 = note: expected enum `Z`
275 found enum constructor `fn(u8) -> Z {Z::Fn}`
276 help: use parentheses to construct this tuple variant
278 LL | let _: Z = Z::Fn(/* u8 */);
281 error[E0533]: expected value, found struct variant `Z::Struct`
282 --> $DIR/privacy-enum-ctor.rs:29:20
284 LL | let _: Z = Z::Struct;
285 | ^^^^^^^^^ not a value
287 error[E0618]: expected function, found enum variant `Z::Unit`
288 --> $DIR/privacy-enum-ctor.rs:31:17
291 | ---- enum variant `Z::Unit` defined here
293 LL | let _ = Z::Unit();
296 | call expression requires function
298 help: `Z::Unit` is a unit enum variant, and does not take parentheses to be constructed
300 LL - let _ = Z::Unit();
301 LL + let _ = Z::Unit;
304 error[E0308]: mismatched types
305 --> $DIR/privacy-enum-ctor.rs:43:16
308 | -- `Fn` defines an enum variant constructor here, which should be called
310 LL | let _: E = m::E::Fn;
311 | - ^^^^^^^^ expected enum `E`, found enum constructor
313 | expected due to this
315 = note: expected enum `E`
316 found enum constructor `fn(u8) -> E {E::Fn}`
317 help: use parentheses to construct this tuple variant
319 LL | let _: E = m::E::Fn(/* u8 */);
322 error[E0533]: expected value, found struct variant `m::E::Struct`
323 --> $DIR/privacy-enum-ctor.rs:45:16
325 LL | let _: E = m::E::Struct;
326 | ^^^^^^^^^^^^ not a value
328 error[E0618]: expected function, found enum variant `m::E::Unit`
329 --> $DIR/privacy-enum-ctor.rs:47:16
332 | ---- enum variant `m::E::Unit` defined here
334 LL | let _: E = m::E::Unit();
337 | call expression requires function
339 help: `m::E::Unit` is a unit enum variant, and does not take parentheses to be constructed
341 LL - let _: E = m::E::Unit();
342 LL + let _: E = m::E::Unit;
345 error[E0308]: mismatched types
346 --> $DIR/privacy-enum-ctor.rs:51:16
349 | -- `Fn` defines an enum variant constructor here, which should be called
351 LL | let _: E = E::Fn;
352 | - ^^^^^ expected enum `E`, found enum constructor
354 | expected due to this
356 = note: expected enum `E`
357 found enum constructor `fn(u8) -> E {E::Fn}`
358 help: use parentheses to construct this tuple variant
360 LL | let _: E = E::Fn(/* u8 */);
363 error[E0533]: expected value, found struct variant `E::Struct`
364 --> $DIR/privacy-enum-ctor.rs:53:16
366 LL | let _: E = E::Struct;
367 | ^^^^^^^^^ not a value
369 error[E0618]: expected function, found enum variant `E::Unit`
370 --> $DIR/privacy-enum-ctor.rs:55:16
373 | ---- enum variant `E::Unit` defined here
375 LL | let _: E = E::Unit();
378 | call expression requires function
380 help: `E::Unit` is a unit enum variant, and does not take parentheses to be constructed
382 LL - let _: E = E::Unit();
383 LL + let _: E = E::Unit;
386 error[E0533]: expected value, found struct variant `m::n::Z::Struct`
387 --> $DIR/privacy-enum-ctor.rs:64:16
389 LL | let _: Z = m::n::Z::Struct;
390 | ^^^^^^^^^^^^^^^ not a value
392 error: aborting due to 23 previous errors
394 Some errors have detailed explanations: E0308, E0412, E0423, E0533, E0603, E0618.
395 For more information about an error, try `rustc --explain E0308`.