]> git.proxmox.com Git - rustc.git/blob - src/test/ui/privacy/private-in-public.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / privacy / private-in-public.stderr
1 error[E0446]: private type `types::Priv` in public interface
2 --> $DIR/private-in-public.rs:13:5
3 |
4 LL | struct Priv;
5 | - `types::Priv` declared as private
6 ...
7 LL | pub const C: Priv = Priv;
8 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
9
10 error[E0446]: private type `types::Priv` in public interface
11 --> $DIR/private-in-public.rs:14:5
12 |
13 LL | struct Priv;
14 | - `types::Priv` declared as private
15 ...
16 LL | pub static S: Priv = Priv;
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
18
19 error[E0446]: private type `types::Priv` in public interface
20 --> $DIR/private-in-public.rs:15:5
21 |
22 LL | struct Priv;
23 | - `types::Priv` declared as private
24 ...
25 LL | pub fn f1(arg: Priv) {}
26 | ^^^^^^^^^^^^^^^^^^^^ can't leak private type
27
28 error[E0446]: private type `types::Priv` in public interface
29 --> $DIR/private-in-public.rs:16:5
30 |
31 LL | struct Priv;
32 | - `types::Priv` declared as private
33 ...
34 LL | pub fn f2() -> Priv { panic!() }
35 | ^^^^^^^^^^^^^^^^^^^ can't leak private type
36
37 error[E0446]: private type `types::Priv` in public interface
38 --> $DIR/private-in-public.rs:17:19
39 |
40 LL | struct Priv;
41 | - `types::Priv` declared as private
42 ...
43 LL | pub struct S1(pub Priv);
44 | ^^^^^^^^ can't leak private type
45
46 error[E0446]: private type `types::Priv` in public interface
47 --> $DIR/private-in-public.rs:18:21
48 |
49 LL | struct Priv;
50 | - `types::Priv` declared as private
51 ...
52 LL | pub struct S2 { pub field: Priv }
53 | ^^^^^^^^^^^^^^^ can't leak private type
54
55 error[E0446]: private type `types::Priv` in public interface
56 --> $DIR/private-in-public.rs:20:9
57 |
58 LL | struct Priv;
59 | - `types::Priv` declared as private
60 ...
61 LL | pub const C: Priv = Priv;
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
63
64 error[E0446]: private type `types::Priv` in public interface
65 --> $DIR/private-in-public.rs:21:9
66 |
67 LL | struct Priv;
68 | - `types::Priv` declared as private
69 ...
70 LL | pub fn f1(arg: Priv) {}
71 | ^^^^^^^^^^^^^^^^^^^^ can't leak private type
72
73 error[E0446]: private type `types::Priv` in public interface
74 --> $DIR/private-in-public.rs:22:9
75 |
76 LL | struct Priv;
77 | - `types::Priv` declared as private
78 ...
79 LL | pub fn f2() -> Priv { panic!() }
80 | ^^^^^^^^^^^^^^^^^^^ can't leak private type
81
82 error[E0445]: private trait `traits::PrivTr` in public interface
83 --> $DIR/private-in-public.rs:31:5
84 |
85 LL | trait PrivTr {}
86 | - `traits::PrivTr` declared as private
87 ...
88 LL | pub enum E<T: PrivTr> { V(T) }
89 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
90
91 error[E0445]: private trait `traits::PrivTr` in public interface
92 --> $DIR/private-in-public.rs:32:5
93 |
94 LL | trait PrivTr {}
95 | - `traits::PrivTr` declared as private
96 ...
97 LL | pub fn f<T: PrivTr>(arg: T) {}
98 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
99
100 error[E0445]: private trait `traits::PrivTr` in public interface
101 --> $DIR/private-in-public.rs:33:5
102 |
103 LL | trait PrivTr {}
104 | - `traits::PrivTr` declared as private
105 ...
106 LL | pub struct S1<T: PrivTr>(T);
107 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
108
109 error[E0445]: private trait `traits::PrivTr` in public interface
110 --> $DIR/private-in-public.rs:34:5
111 |
112 LL | trait PrivTr {}
113 | - `traits::PrivTr` declared as private
114 ...
115 LL | / impl<T: PrivTr> Pub<T> {
116 LL | | pub fn f<U: PrivTr>(arg: U) {}
117 LL | | }
118 | |_____^ can't leak private trait
119
120 error[E0445]: private trait `traits::PrivTr` in public interface
121 --> $DIR/private-in-public.rs:35:9
122 |
123 LL | trait PrivTr {}
124 | - `traits::PrivTr` declared as private
125 ...
126 LL | pub fn f<U: PrivTr>(arg: U) {}
127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
128
129 error[E0445]: private trait `traits_where::PrivTr` in public interface
130 --> $DIR/private-in-public.rs:44:5
131 |
132 LL | trait PrivTr {}
133 | - `traits_where::PrivTr` declared as private
134 ...
135 LL | pub enum E<T> where T: PrivTr { V(T) }
136 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
137
138 error[E0445]: private trait `traits_where::PrivTr` in public interface
139 --> $DIR/private-in-public.rs:46:5
140 |
141 LL | trait PrivTr {}
142 | - `traits_where::PrivTr` declared as private
143 ...
144 LL | pub fn f<T>(arg: T) where T: PrivTr {}
145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
146
147 error[E0445]: private trait `traits_where::PrivTr` in public interface
148 --> $DIR/private-in-public.rs:48:5
149 |
150 LL | trait PrivTr {}
151 | - `traits_where::PrivTr` declared as private
152 ...
153 LL | pub struct S1<T>(T) where T: PrivTr;
154 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
155
156 error[E0445]: private trait `traits_where::PrivTr` in public interface
157 --> $DIR/private-in-public.rs:50:5
158 |
159 LL | trait PrivTr {}
160 | - `traits_where::PrivTr` declared as private
161 ...
162 LL | / impl<T> Pub<T> where T: PrivTr {
163 LL | |
164 LL | | pub fn f<U>(arg: U) where U: PrivTr {}
165 LL | |
166 LL | | }
167 | |_____^ can't leak private trait
168
169 error[E0445]: private trait `traits_where::PrivTr` in public interface
170 --> $DIR/private-in-public.rs:52:9
171 |
172 LL | trait PrivTr {}
173 | - `traits_where::PrivTr` declared as private
174 ...
175 LL | pub fn f<U>(arg: U) where U: PrivTr {}
176 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
177
178 error[E0446]: private type `generics::Priv` in public interface
179 --> $DIR/private-in-public.rs:63:5
180 |
181 LL | struct Priv<T = u8>(T);
182 | - `generics::Priv` declared as private
183 ...
184 LL | pub fn f1(arg: [Priv; 1]) {}
185 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
186
187 error[E0446]: private type `generics::Priv` in public interface
188 --> $DIR/private-in-public.rs:64:5
189 |
190 LL | struct Priv<T = u8>(T);
191 | - `generics::Priv` declared as private
192 ...
193 LL | pub fn f2(arg: Pub<Priv>) {}
194 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
195
196 error[E0446]: private type `generics::Priv<generics::Pub>` in public interface
197 --> $DIR/private-in-public.rs:65:5
198 |
199 LL | struct Priv<T = u8>(T);
200 | - `generics::Priv<generics::Pub>` declared as private
201 ...
202 LL | pub fn f3(arg: Priv<Pub>) {}
203 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
204
205 error[E0446]: private type `impls::Priv` in public interface
206 --> $DIR/private-in-public.rs:80:9
207 |
208 LL | struct Priv;
209 | - `impls::Priv` declared as private
210 ...
211 LL | pub fn f(arg: Priv) {}
212 | ^^^^^^^^^^^^^^^^^^^ can't leak private type
213
214 error[E0445]: private trait `aliases_pub::PrivTr` in public interface
215 --> $DIR/private-in-public.rs:104:5
216 |
217 LL | trait PrivTr {
218 | - `aliases_pub::PrivTr` declared as private
219 ...
220 LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
221 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
222
223 error[E0446]: private type `aliases_pub::Priv` in public interface
224 --> $DIR/private-in-public.rs:104:5
225 |
226 LL | struct Priv;
227 | - `aliases_pub::Priv` declared as private
228 ...
229 LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
230 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
231
232 error[E0446]: private type `aliases_pub::Priv` in public interface
233 --> $DIR/private-in-public.rs:109:9
234 |
235 LL | struct Priv;
236 | - `aliases_pub::Priv` declared as private
237 ...
238 LL | pub fn f(arg: Priv) {}
239 | ^^^^^^^^^^^^^^^^^^^ can't leak private type
240
241 error[E0446]: private type `Priv1` in public interface
242 --> $DIR/private-in-public.rs:131:5
243 |
244 LL | struct Priv1;
245 | - `Priv1` declared as private
246 ...
247 LL | pub fn f1(arg: PrivUseAlias) {}
248 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
249
250 error[E0446]: private type `Priv2` in public interface
251 --> $DIR/private-in-public.rs:132:5
252 |
253 LL | struct Priv2;
254 | - `Priv2` declared as private
255 ...
256 LL | pub fn f2(arg: PrivAlias) {}
257 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
258
259 error[E0445]: private trait `aliases_priv::PrivTr` in public interface
260 --> $DIR/private-in-public.rs:133:5
261 |
262 LL | trait PrivTr {
263 | - `aliases_priv::PrivTr` declared as private
264 ...
265 LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
266 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
267
268 error[E0446]: private type `aliases_priv::Priv` in public interface
269 --> $DIR/private-in-public.rs:133:5
270 |
271 LL | struct Priv;
272 | - `aliases_priv::Priv` declared as private
273 ...
274 LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
275 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
276
277 error[E0446]: private type `aliases_params::Priv` in public interface
278 --> $DIR/private-in-public.rs:143:5
279 |
280 LL | struct Priv;
281 | - `aliases_params::Priv` declared as private
282 ...
283 LL | pub fn f2(arg: PrivAliasGeneric) {}
284 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
285
286 error[E0446]: private type `aliases_params::Priv` in public interface
287 --> $DIR/private-in-public.rs:145:5
288 |
289 LL | struct Priv;
290 | - `aliases_params::Priv` declared as private
291 ...
292 LL | pub fn f3(arg: Result<u8>) {}
293 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
294
295 error: aborting due to 32 previous errors
296
297 Some errors have detailed explanations: E0445, E0446.
298 For more information about an error, try `rustc --explain E0445`.