]> git.proxmox.com Git - rustc.git/blob - src/test/ui/resolve/privacy-enum-ctor.stderr
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / ui / resolve / privacy-enum-ctor.stderr
1 error[E0423]: expected value, found enum `n::Z`
2 --> $DIR/privacy-enum-ctor.rs:23:9
3 |
4 LL | n::Z;
5 | ^^^^
6 |
7 = note: did you mean to use one of the following variants?
8 - `m::Z::Fn`
9 - `m::Z::Struct`
10 - `m::Z::Unit`
11
12 error[E0423]: expected value, found enum `Z`
13 --> $DIR/privacy-enum-ctor.rs:25:9
14 |
15 LL | Z;
16 | ^ help: a function with a similar name exists: `f`
17 |
18 = note: did you mean to use one of the following variants?
19 - `m::Z::Fn`
20 - `m::Z::Struct`
21 - `m::Z::Unit`
22
23 error[E0423]: expected value, found struct variant `Z::Struct`
24 --> $DIR/privacy-enum-ctor.rs:29:20
25 |
26 LL | let _: Z = Z::Struct;
27 | ^^^^^^^^^ did you mean `Z::Struct { /* fields */ }`?
28
29 error[E0423]: expected value, found enum `m::E`
30 --> $DIR/privacy-enum-ctor.rs:41:16
31 |
32 LL | let _: E = m::E;
33 | ^^^^
34 |
35 = note: did you mean to use one of the following variants?
36 - `E::Fn`
37 - `E::Struct`
38 - `E::Unit`
39 help: a function with a similar name exists
40 |
41 LL | let _: E = m::f;
42 | ^
43 help: possible better candidates are found in other modules, you can import them into scope
44 |
45 LL | use std::f32::consts::E;
46 |
47 LL | use std::f64::consts::E;
48 |
49
50 error[E0423]: expected value, found struct variant `m::E::Struct`
51 --> $DIR/privacy-enum-ctor.rs:45:16
52 |
53 LL | let _: E = m::E::Struct;
54 | ^^^^^^^^^^^^ did you mean `m::E::Struct { /* fields */ }`?
55
56 error[E0423]: expected value, found enum `E`
57 --> $DIR/privacy-enum-ctor.rs:49:16
58 |
59 LL | let _: E = E;
60 | ^
61 |
62 = note: did you mean to use one of the following variants?
63 - `E::Fn`
64 - `E::Struct`
65 - `E::Unit`
66 help: possible better candidates are found in other modules, you can import them into scope
67 |
68 LL | use std::f32::consts::E;
69 |
70 LL | use std::f64::consts::E;
71 |
72
73 error[E0423]: expected value, found struct variant `E::Struct`
74 --> $DIR/privacy-enum-ctor.rs:53:16
75 |
76 LL | let _: E = E::Struct;
77 | ^^^^^^^^^ did you mean `E::Struct { /* fields */ }`?
78
79 error[E0412]: cannot find type `Z` in this scope
80 --> $DIR/privacy-enum-ctor.rs:57:12
81 |
82 LL | let _: Z = m::n::Z;
83 | ^
84 help: an enum with a similar name exists
85 |
86 LL | let _: E = m::n::Z;
87 | ^
88 help: possible candidate is found in another module, you can import it into scope
89 |
90 LL | use m::n::Z;
91 |
92
93 error[E0423]: expected value, found enum `m::n::Z`
94 --> $DIR/privacy-enum-ctor.rs:57:16
95 |
96 LL | let _: Z = m::n::Z;
97 | ^^^^^^^
98 |
99 = note: did you mean to use one of the following variants?
100 - `m::Z::Fn`
101 - `m::Z::Struct`
102 - `m::Z::Unit`
103
104 error[E0412]: cannot find type `Z` in this scope
105 --> $DIR/privacy-enum-ctor.rs:61:12
106 |
107 LL | let _: Z = m::n::Z::Fn;
108 | ^
109 help: an enum with a similar name exists
110 |
111 LL | let _: E = m::n::Z::Fn;
112 | ^
113 help: possible candidate is found in another module, you can import it into scope
114 |
115 LL | use m::n::Z;
116 |
117
118 error[E0412]: cannot find type `Z` in this scope
119 --> $DIR/privacy-enum-ctor.rs:64:12
120 |
121 LL | let _: Z = m::n::Z::Struct;
122 | ^
123 help: an enum with a similar name exists
124 |
125 LL | let _: E = m::n::Z::Struct;
126 | ^
127 help: possible candidate is found in another module, you can import it into scope
128 |
129 LL | use m::n::Z;
130 |
131
132 error[E0423]: expected value, found struct variant `m::n::Z::Struct`
133 --> $DIR/privacy-enum-ctor.rs:64:16
134 |
135 LL | let _: Z = m::n::Z::Struct;
136 | ^^^^^^^^^^^^^^^ did you mean `m::n::Z::Struct { /* fields */ }`?
137
138 error[E0412]: cannot find type `Z` in this scope
139 --> $DIR/privacy-enum-ctor.rs:68:12
140 |
141 LL | let _: Z = m::n::Z::Unit {};
142 | ^
143 help: an enum with a similar name exists
144 |
145 LL | let _: E = m::n::Z::Unit {};
146 | ^
147 help: possible candidate is found in another module, you can import it into scope
148 |
149 LL | use m::n::Z;
150 |
151
152 error[E0603]: enum `Z` is private
153 --> $DIR/privacy-enum-ctor.rs:57:22
154 |
155 LL | let _: Z = m::n::Z;
156 | ^
157
158 error[E0603]: enum `Z` is private
159 --> $DIR/privacy-enum-ctor.rs:61:22
160 |
161 LL | let _: Z = m::n::Z::Fn;
162 | ^
163
164 error[E0603]: enum `Z` is private
165 --> $DIR/privacy-enum-ctor.rs:64:22
166 |
167 LL | let _: Z = m::n::Z::Struct;
168 | ^
169
170 error[E0603]: enum `Z` is private
171 --> $DIR/privacy-enum-ctor.rs:68:22
172 |
173 LL | let _: Z = m::n::Z::Unit {};
174 | ^
175
176 error[E0308]: mismatched types
177 --> $DIR/privacy-enum-ctor.rs:27:20
178 |
179 LL | let _: Z = Z::Fn;
180 | ^^^^^ expected enum `m::n::Z`, found fn item
181 |
182 = note: expected type `m::n::Z`
183 found type `fn(u8) -> m::n::Z {m::n::Z::Fn}`
184
185 error[E0618]: expected function, found enum variant `Z::Unit`
186 --> $DIR/privacy-enum-ctor.rs:31:17
187 |
188 LL | Unit,
189 | ---- `Z::Unit` defined here
190 ...
191 LL | let _ = Z::Unit();
192 | ^^^^^^^--
193 | |
194 | call expression requires function
195 help: `Z::Unit` is a unit variant, you need to write it without the parenthesis
196 |
197 LL | let _ = Z::Unit;
198 | ^^^^^^^
199
200 error[E0308]: mismatched types
201 --> $DIR/privacy-enum-ctor.rs:43:16
202 |
203 LL | let _: E = m::E::Fn;
204 | ^^^^^^^^ expected enum `m::E`, found fn item
205 |
206 = note: expected type `m::E`
207 found type `fn(u8) -> m::E {m::E::Fn}`
208
209 error[E0618]: expected function, found enum variant `m::E::Unit`
210 --> $DIR/privacy-enum-ctor.rs:47:16
211 |
212 LL | Unit,
213 | ---- `m::E::Unit` defined here
214 ...
215 LL | let _: E = m::E::Unit();
216 | ^^^^^^^^^^--
217 | |
218 | call expression requires function
219 help: `m::E::Unit` is a unit variant, you need to write it without the parenthesis
220 |
221 LL | let _: E = m::E::Unit;
222 | ^^^^^^^^^^
223
224 error[E0308]: mismatched types
225 --> $DIR/privacy-enum-ctor.rs:51:16
226 |
227 LL | let _: E = E::Fn;
228 | ^^^^^ expected enum `m::E`, found fn item
229 |
230 = note: expected type `m::E`
231 found type `fn(u8) -> m::E {m::E::Fn}`
232
233 error[E0618]: expected function, found enum variant `E::Unit`
234 --> $DIR/privacy-enum-ctor.rs:55:16
235 |
236 LL | Unit,
237 | ---- `E::Unit` defined here
238 ...
239 LL | let _: E = E::Unit();
240 | ^^^^^^^--
241 | |
242 | call expression requires function
243 help: `E::Unit` is a unit variant, you need to write it without the parenthesis
244 |
245 LL | let _: E = E::Unit;
246 | ^^^^^^^
247
248 error: aborting due to 23 previous errors
249
250 Some errors occurred: E0308, E0412, E0423, E0603, E0618.
251 For more information about an error, try `rustc --explain E0308`.