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