]>
Commit | Line | Data |
---|---|---|
2c00a5a8 | 1 | error[E0423]: expected value, found enum `n::Z` |
0731742a | 2 | --> $DIR/privacy-enum-ctor.rs:23:9 |
2c00a5a8 | 3 | | |
0531ce1d | 4 | LL | n::Z; |
2c00a5a8 | 5 | | ^^^^ |
e74abb32 | 6 | | |
532ac7d7 XL |
7 | help: try using one of the enum's variants |
8 | | | |
9 | LL | m::Z::Fn; | |
10 | | ^^^^^^^^ | |
11 | LL | m::Z::Struct; | |
12 | | ^^^^^^^^^^^^ | |
13 | LL | m::Z::Unit; | |
14 | | ^^^^^^^^^^ | |
2c00a5a8 XL |
15 | |
16 | error[E0423]: expected value, found enum `Z` | |
0731742a | 17 | --> $DIR/privacy-enum-ctor.rs:25:9 |
2c00a5a8 | 18 | | |
e74abb32 XL |
19 | LL | / fn f() { |
20 | LL | | n::Z; | |
21 | LL | | | |
22 | LL | | Z; | |
23 | | | ^ | |
24 | ... | | |
25 | LL | | // This is ok, it is equivalent to not having braces | |
26 | LL | | } | |
27 | | |_____- similarly named function `f` defined here | |
28 | | | |
532ac7d7 XL |
29 | help: a function with a similar name exists |
30 | | | |
31 | LL | f; | |
32 | | ^ | |
33 | help: try using one of the enum's variants | |
2c00a5a8 | 34 | | |
532ac7d7 XL |
35 | LL | m::Z::Fn; |
36 | | ^^^^^^^^ | |
37 | LL | m::Z::Struct; | |
38 | | ^^^^^^^^^^^^ | |
39 | LL | m::Z::Unit; | |
40 | | ^^^^^^^^^^ | |
2c00a5a8 XL |
41 | |
42 | error[E0423]: expected value, found struct variant `Z::Struct` | |
0731742a | 43 | --> $DIR/privacy-enum-ctor.rs:29:20 |
2c00a5a8 | 44 | | |
e74abb32 XL |
45 | LL | / Struct { |
46 | LL | | s: u8, | |
47 | LL | | }, | |
48 | | |_____________- `Z::Struct` defined here | |
49 | ... | |
50 | LL | let _: Z = Z::Struct; | |
51 | | ^^^^^^^^^ did you mean `Z::Struct { /* fields */ }`? | |
2c00a5a8 XL |
52 | |
53 | error[E0423]: expected value, found enum `m::E` | |
0731742a | 54 | --> $DIR/privacy-enum-ctor.rs:41:16 |
2c00a5a8 | 55 | | |
e74abb32 XL |
56 | LL | / fn f() { |
57 | LL | | n::Z; | |
58 | LL | | | |
59 | LL | | Z; | |
60 | ... | | |
61 | LL | | // This is ok, it is equivalent to not having braces | |
62 | LL | | } | |
63 | | |_____- similarly named function `f` defined here | |
64 | ... | |
65 | LL | let _: E = m::E; | |
66 | | ^^^^ | |
67 | | | |
0731742a XL |
68 | help: a function with a similar name exists |
69 | | | |
70 | LL | let _: E = m::f; | |
71 | | ^ | |
532ac7d7 XL |
72 | help: try using one of the enum's variants |
73 | | | |
74 | LL | let _: E = E::Fn; | |
75 | | ^^^^^ | |
76 | LL | let _: E = E::Struct; | |
77 | | ^^^^^^^^^ | |
78 | LL | let _: E = E::Unit; | |
79 | | ^^^^^^^ | |
2c00a5a8 XL |
80 | help: possible better candidates are found in other modules, you can import them into scope |
81 | | | |
0531ce1d | 82 | LL | use std::f32::consts::E; |
2c00a5a8 | 83 | | |
0531ce1d | 84 | LL | use std::f64::consts::E; |
2c00a5a8 XL |
85 | | |
86 | ||
87 | error[E0423]: expected value, found struct variant `m::E::Struct` | |
0731742a | 88 | --> $DIR/privacy-enum-ctor.rs:45:16 |
2c00a5a8 | 89 | | |
e74abb32 XL |
90 | LL | / Struct { |
91 | LL | | s: u8, | |
92 | LL | | }, | |
93 | | |_________- `m::E::Struct` defined here | |
94 | ... | |
95 | LL | let _: E = m::E::Struct; | |
96 | | ^^^^^^^^^^^^ did you mean `m::E::Struct { /* fields */ }`? | |
2c00a5a8 XL |
97 | |
98 | error[E0423]: expected value, found enum `E` | |
0731742a | 99 | --> $DIR/privacy-enum-ctor.rs:49:16 |
2c00a5a8 | 100 | | |
0531ce1d | 101 | LL | let _: E = E; |
2c00a5a8 | 102 | | ^ |
e74abb32 | 103 | | |
532ac7d7 | 104 | help: try using one of the enum's variants |
2c00a5a8 | 105 | | |
532ac7d7 XL |
106 | LL | let _: E = E::Fn; |
107 | | ^^^^^ | |
108 | LL | let _: E = E::Struct; | |
109 | | ^^^^^^^^^ | |
110 | LL | let _: E = E::Unit; | |
111 | | ^^^^^^^ | |
2c00a5a8 XL |
112 | help: possible better candidates are found in other modules, you can import them into scope |
113 | | | |
0531ce1d | 114 | LL | use std::f32::consts::E; |
2c00a5a8 | 115 | | |
0531ce1d | 116 | LL | use std::f64::consts::E; |
2c00a5a8 XL |
117 | | |
118 | ||
119 | error[E0423]: expected value, found struct variant `E::Struct` | |
0731742a | 120 | --> $DIR/privacy-enum-ctor.rs:53:16 |
2c00a5a8 | 121 | | |
e74abb32 XL |
122 | LL | / Struct { |
123 | LL | | s: u8, | |
124 | LL | | }, | |
125 | | |_________- `E::Struct` defined here | |
126 | ... | |
127 | LL | let _: E = E::Struct; | |
128 | | ^^^^^^^^^ did you mean `E::Struct { /* fields */ }`? | |
2c00a5a8 XL |
129 | |
130 | error[E0412]: cannot find type `Z` in this scope | |
0731742a | 131 | --> $DIR/privacy-enum-ctor.rs:57:12 |
2c00a5a8 | 132 | | |
e74abb32 XL |
133 | LL | / pub enum E { |
134 | LL | | Fn(u8), | |
135 | LL | | Struct { | |
136 | LL | | s: u8, | |
137 | LL | | }, | |
138 | LL | | Unit, | |
139 | LL | | } | |
140 | | |_____- similarly named enum `E` defined here | |
141 | ... | |
142 | LL | let _: Z = m::n::Z; | |
143 | | ^ | |
144 | | | |
0731742a XL |
145 | help: an enum with a similar name exists |
146 | | | |
147 | LL | let _: E = m::n::Z; | |
148 | | ^ | |
2c00a5a8 XL |
149 | help: possible candidate is found in another module, you can import it into scope |
150 | | | |
0531ce1d | 151 | LL | use m::n::Z; |
2c00a5a8 XL |
152 | | |
153 | ||
154 | error[E0423]: expected value, found enum `m::n::Z` | |
0731742a | 155 | --> $DIR/privacy-enum-ctor.rs:57:16 |
2c00a5a8 | 156 | | |
0531ce1d | 157 | LL | let _: Z = m::n::Z; |
2c00a5a8 | 158 | | ^^^^^^^ |
e74abb32 | 159 | | |
532ac7d7 XL |
160 | help: try using one of the enum's variants |
161 | | | |
162 | LL | let _: Z = m::Z::Fn; | |
163 | | ^^^^^^^^ | |
164 | LL | let _: Z = m::Z::Struct; | |
165 | | ^^^^^^^^^^^^ | |
166 | LL | let _: Z = m::Z::Unit; | |
167 | | ^^^^^^^^^^ | |
2c00a5a8 XL |
168 | |
169 | error[E0412]: cannot find type `Z` in this scope | |
0731742a | 170 | --> $DIR/privacy-enum-ctor.rs:61:12 |
2c00a5a8 | 171 | | |
e74abb32 XL |
172 | LL | / pub enum E { |
173 | LL | | Fn(u8), | |
174 | LL | | Struct { | |
175 | LL | | s: u8, | |
176 | LL | | }, | |
177 | LL | | Unit, | |
178 | LL | | } | |
179 | | |_____- similarly named enum `E` defined here | |
180 | ... | |
181 | LL | let _: Z = m::n::Z::Fn; | |
182 | | ^ | |
183 | | | |
0731742a XL |
184 | help: an enum with a similar name exists |
185 | | | |
186 | LL | let _: E = m::n::Z::Fn; | |
187 | | ^ | |
2c00a5a8 XL |
188 | help: possible candidate is found in another module, you can import it into scope |
189 | | | |
0531ce1d | 190 | LL | use m::n::Z; |
2c00a5a8 XL |
191 | | |
192 | ||
193 | error[E0412]: cannot find type `Z` in this scope | |
0731742a | 194 | --> $DIR/privacy-enum-ctor.rs:64:12 |
2c00a5a8 | 195 | | |
e74abb32 XL |
196 | LL | / pub enum E { |
197 | LL | | Fn(u8), | |
198 | LL | | Struct { | |
199 | LL | | s: u8, | |
200 | LL | | }, | |
201 | LL | | Unit, | |
202 | LL | | } | |
203 | | |_____- similarly named enum `E` defined here | |
204 | ... | |
205 | LL | let _: Z = m::n::Z::Struct; | |
206 | | ^ | |
207 | | | |
0731742a XL |
208 | help: an enum with a similar name exists |
209 | | | |
210 | LL | let _: E = m::n::Z::Struct; | |
211 | | ^ | |
2c00a5a8 XL |
212 | help: possible candidate is found in another module, you can import it into scope |
213 | | | |
0531ce1d | 214 | LL | use m::n::Z; |
2c00a5a8 XL |
215 | | |
216 | ||
217 | error[E0423]: expected value, found struct variant `m::n::Z::Struct` | |
0731742a | 218 | --> $DIR/privacy-enum-ctor.rs:64:16 |
2c00a5a8 | 219 | | |
e74abb32 XL |
220 | LL | / Struct { |
221 | LL | | s: u8, | |
222 | LL | | }, | |
223 | | |_____________- `m::n::Z::Struct` defined here | |
224 | ... | |
225 | LL | let _: Z = m::n::Z::Struct; | |
226 | | ^^^^^^^^^^^^^^^ did you mean `m::n::Z::Struct { /* fields */ }`? | |
2c00a5a8 XL |
227 | |
228 | error[E0412]: cannot find type `Z` in this scope | |
0731742a | 229 | --> $DIR/privacy-enum-ctor.rs:68:12 |
2c00a5a8 | 230 | | |
e74abb32 XL |
231 | LL | / pub enum E { |
232 | LL | | Fn(u8), | |
233 | LL | | Struct { | |
234 | LL | | s: u8, | |
235 | LL | | }, | |
236 | LL | | Unit, | |
237 | LL | | } | |
238 | | |_____- similarly named enum `E` defined here | |
239 | ... | |
240 | LL | let _: Z = m::n::Z::Unit {}; | |
241 | | ^ | |
242 | | | |
0731742a XL |
243 | help: an enum with a similar name exists |
244 | | | |
245 | LL | let _: E = m::n::Z::Unit {}; | |
246 | | ^ | |
2c00a5a8 XL |
247 | help: possible candidate is found in another module, you can import it into scope |
248 | | | |
0531ce1d | 249 | LL | use m::n::Z; |
2c00a5a8 XL |
250 | | |
251 | ||
252 | error[E0603]: enum `Z` is private | |
0731742a | 253 | --> $DIR/privacy-enum-ctor.rs:57:22 |
2c00a5a8 | 254 | | |
0531ce1d | 255 | LL | let _: Z = m::n::Z; |
dfeec247 XL |
256 | | ^ this enum is private |
257 | | | |
258 | note: the enum `Z` is defined here | |
259 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
260 | | | |
261 | LL | pub(in m) enum Z { | |
262 | | ^^^^^^^^^^^^^^^^ | |
2c00a5a8 XL |
263 | |
264 | error[E0603]: enum `Z` is private | |
0731742a | 265 | --> $DIR/privacy-enum-ctor.rs:61:22 |
2c00a5a8 | 266 | | |
0531ce1d | 267 | LL | let _: Z = m::n::Z::Fn; |
dfeec247 XL |
268 | | ^ this enum is private |
269 | | | |
270 | note: the enum `Z` is defined here | |
271 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
272 | | | |
273 | LL | pub(in m) enum Z { | |
274 | | ^^^^^^^^^^^^^^^^ | |
2c00a5a8 XL |
275 | |
276 | error[E0603]: enum `Z` is private | |
0731742a | 277 | --> $DIR/privacy-enum-ctor.rs:64:22 |
2c00a5a8 | 278 | | |
0531ce1d | 279 | LL | let _: Z = m::n::Z::Struct; |
dfeec247 XL |
280 | | ^ this enum is private |
281 | | | |
282 | note: the enum `Z` is defined here | |
283 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
284 | | | |
285 | LL | pub(in m) enum Z { | |
286 | | ^^^^^^^^^^^^^^^^ | |
2c00a5a8 XL |
287 | |
288 | error[E0603]: enum `Z` is private | |
0731742a | 289 | --> $DIR/privacy-enum-ctor.rs:68:22 |
2c00a5a8 | 290 | | |
0531ce1d | 291 | LL | let _: Z = m::n::Z::Unit {}; |
dfeec247 XL |
292 | | ^ this enum is private |
293 | | | |
294 | note: the enum `Z` is defined here | |
295 | --> $DIR/privacy-enum-ctor.rs:11:9 | |
296 | | | |
297 | LL | pub(in m) enum Z { | |
298 | | ^^^^^^^^^^^^^^^^ | |
2c00a5a8 XL |
299 | |
300 | error[E0308]: mismatched types | |
0731742a | 301 | --> $DIR/privacy-enum-ctor.rs:27:20 |
2c00a5a8 | 302 | | |
416331ca XL |
303 | LL | Fn(u8), |
304 | | ------ fn(u8) -> m::n::Z {m::n::Z::Fn} defined here | |
305 | ... | |
0531ce1d | 306 | LL | let _: Z = Z::Fn; |
60c5eb7d XL |
307 | | - ^^^^^ |
308 | | | | | |
309 | | | expected enum `m::n::Z`, found fn item | |
310 | | | help: use parentheses to instantiate this tuple variant: `Z::Fn(_)` | |
311 | | expected due to this | |
312 | | | |
313 | = note: expected enum `m::n::Z` | |
314 | found fn item `fn(u8) -> m::n::Z {m::n::Z::Fn}` | |
2c00a5a8 XL |
315 | |
316 | error[E0618]: expected function, found enum variant `Z::Unit` | |
0731742a | 317 | --> $DIR/privacy-enum-ctor.rs:31:17 |
2c00a5a8 | 318 | | |
0531ce1d | 319 | LL | Unit, |
2c00a5a8 XL |
320 | | ---- `Z::Unit` defined here |
321 | ... | |
0531ce1d | 322 | LL | let _ = Z::Unit(); |
a1dfa0c6 XL |
323 | | ^^^^^^^-- |
324 | | | | |
325 | | call expression requires function | |
e74abb32 | 326 | | |
2c00a5a8 XL |
327 | help: `Z::Unit` is a unit variant, you need to write it without the parenthesis |
328 | | | |
0531ce1d | 329 | LL | let _ = Z::Unit; |
2c00a5a8 XL |
330 | | ^^^^^^^ |
331 | ||
332 | error[E0308]: mismatched types | |
0731742a | 333 | --> $DIR/privacy-enum-ctor.rs:43:16 |
2c00a5a8 | 334 | | |
416331ca XL |
335 | LL | Fn(u8), |
336 | | ------ fn(u8) -> m::E {m::E::Fn} defined here | |
337 | ... | |
0531ce1d | 338 | LL | let _: E = m::E::Fn; |
60c5eb7d XL |
339 | | - ^^^^^^^^ |
340 | | | | | |
341 | | | expected enum `m::E`, found fn item | |
342 | | | help: use parentheses to instantiate this tuple variant: `m::E::Fn(_)` | |
343 | | expected due to this | |
344 | | | |
345 | = note: expected enum `m::E` | |
346 | found fn item `fn(u8) -> m::E {m::E::Fn}` | |
2c00a5a8 XL |
347 | |
348 | error[E0618]: expected function, found enum variant `m::E::Unit` | |
0731742a | 349 | --> $DIR/privacy-enum-ctor.rs:47:16 |
2c00a5a8 | 350 | | |
0531ce1d | 351 | LL | Unit, |
2c00a5a8 XL |
352 | | ---- `m::E::Unit` defined here |
353 | ... | |
0531ce1d | 354 | LL | let _: E = m::E::Unit(); |
a1dfa0c6 XL |
355 | | ^^^^^^^^^^-- |
356 | | | | |
357 | | call expression requires function | |
e74abb32 | 358 | | |
2c00a5a8 XL |
359 | help: `m::E::Unit` is a unit variant, you need to write it without the parenthesis |
360 | | | |
0531ce1d | 361 | LL | let _: E = m::E::Unit; |
2c00a5a8 XL |
362 | | ^^^^^^^^^^ |
363 | ||
364 | error[E0308]: mismatched types | |
0731742a | 365 | --> $DIR/privacy-enum-ctor.rs:51:16 |
2c00a5a8 | 366 | | |
416331ca XL |
367 | LL | Fn(u8), |
368 | | ------ fn(u8) -> m::E {m::E::Fn} defined here | |
369 | ... | |
0531ce1d | 370 | LL | let _: E = E::Fn; |
60c5eb7d XL |
371 | | - ^^^^^ |
372 | | | | | |
373 | | | expected enum `m::E`, found fn item | |
374 | | | help: use parentheses to instantiate this tuple variant: `E::Fn(_)` | |
375 | | expected due to this | |
376 | | | |
377 | = note: expected enum `m::E` | |
378 | found fn item `fn(u8) -> m::E {m::E::Fn}` | |
2c00a5a8 XL |
379 | |
380 | error[E0618]: expected function, found enum variant `E::Unit` | |
0731742a | 381 | --> $DIR/privacy-enum-ctor.rs:55:16 |
2c00a5a8 | 382 | | |
0531ce1d | 383 | LL | Unit, |
2c00a5a8 XL |
384 | | ---- `E::Unit` defined here |
385 | ... | |
0531ce1d | 386 | LL | let _: E = E::Unit(); |
a1dfa0c6 XL |
387 | | ^^^^^^^-- |
388 | | | | |
389 | | call expression requires function | |
e74abb32 | 390 | | |
2c00a5a8 XL |
391 | help: `E::Unit` is a unit variant, you need to write it without the parenthesis |
392 | | | |
0531ce1d | 393 | LL | let _: E = E::Unit; |
2c00a5a8 XL |
394 | | ^^^^^^^ |
395 | ||
396 | error: aborting due to 23 previous errors | |
397 | ||
48663c56 | 398 | Some errors have detailed explanations: E0308, E0412, E0423, E0603, E0618. |
0531ce1d | 399 | For more information about an error, try `rustc --explain E0308`. |