]> git.lizzy.rs Git - rust.git/blob - src/test/ui/privacy/private-in-public-warn.stderr
Rollup merge of #86747 - FabianWolff:issue-86653, r=GuillaumeGomez
[rust.git] / src / test / ui / privacy / private-in-public-warn.stderr
1 error: private type `types::Priv` in public interface (error E0446)
2   --> $DIR/private-in-public-warn.rs:15:5
3    |
4 LL |     pub type Alias = Priv;
5    |     ^^^^^^^^^^^^^^^^^^^^^^
6    |
7 note: the lint level is defined here
8   --> $DIR/private-in-public-warn.rs:5:9
9    |
10 LL | #![deny(private_in_public)]
11    |         ^^^^^^^^^^^^^^^^^
12    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
13    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
14
15 error: private type `types::Priv` in public interface (error E0446)
16   --> $DIR/private-in-public-warn.rs:18:12
17    |
18 LL |         V1(Priv),
19    |            ^^^^
20    |
21    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
22    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
23
24 error: private type `types::Priv` in public interface (error E0446)
25   --> $DIR/private-in-public-warn.rs:20:14
26    |
27 LL |         V2 { field: Priv },
28    |              ^^^^^^^^^^^
29    |
30    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
31    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
32
33 error: private type `types::Priv` in public interface (error E0446)
34   --> $DIR/private-in-public-warn.rs:24:9
35    |
36 LL |         const C: Priv = Priv;
37    |         ^^^^^^^^^^^^^^^^^^^^^
38    |
39    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
40    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
41
42 error[E0446]: private type `types::Priv` in public interface
43   --> $DIR/private-in-public-warn.rs:26:9
44    |
45 LL |     struct Priv;
46    |     ------------ `types::Priv` declared as private
47 ...
48 LL |         type Alias = Priv;
49    |         ^^^^^^^^^^^^^^^^^^ can't leak private type
50
51 error: private type `types::Priv` in public interface (error E0446)
52   --> $DIR/private-in-public-warn.rs:27:9
53    |
54 LL |         fn f1(arg: Priv) {}
55    |         ^^^^^^^^^^^^^^^^
56    |
57    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
58    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
59
60 error: private type `types::Priv` in public interface (error E0446)
61   --> $DIR/private-in-public-warn.rs:29:9
62    |
63 LL |         fn f2() -> Priv { panic!() }
64    |         ^^^^^^^^^^^^^^^
65    |
66    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
67    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
68
69 error: private type `types::Priv` in public interface (error E0446)
70   --> $DIR/private-in-public-warn.rs:33:9
71    |
72 LL |         pub static ES: Priv;
73    |         ^^^^^^^^^^^^^^^^^^^^
74    |
75    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
76    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
77
78 error: private type `types::Priv` in public interface (error E0446)
79   --> $DIR/private-in-public-warn.rs:35:9
80    |
81 LL |         pub fn ef1(arg: Priv);
82    |         ^^^^^^^^^^^^^^^^^^^^^^
83    |
84    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
85    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
86
87 error: private type `types::Priv` in public interface (error E0446)
88   --> $DIR/private-in-public-warn.rs:37:9
89    |
90 LL |         pub fn ef2() -> Priv;
91    |         ^^^^^^^^^^^^^^^^^^^^^
92    |
93    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
94    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
95
96 error[E0446]: private type `types::Priv` in public interface
97   --> $DIR/private-in-public-warn.rs:41:9
98    |
99 LL |     struct Priv;
100    |     ------------ `types::Priv` declared as private
101 ...
102 LL |         type Alias = Priv;
103    |         ^^^^^^^^^^^^^^^^^^ can't leak private type
104
105 error: private trait `traits::PrivTr` in public interface (error E0445)
106   --> $DIR/private-in-public-warn.rs:50:5
107    |
108 LL |     pub type Alias<T: PrivTr> = T;
109    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110    |
111    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
112    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
113
114 error: private trait `traits::PrivTr` in public interface (error E0445)
115   --> $DIR/private-in-public-warn.rs:53:5
116    |
117 LL |     pub trait Tr1: PrivTr {}
118    |     ^^^^^^^^^^^^^^^^^^^^^^^^
119    |
120    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
121    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
122
123 error: private trait `traits::PrivTr` in public interface (error E0445)
124   --> $DIR/private-in-public-warn.rs:55:5
125    |
126 LL |     pub trait Tr2<T: PrivTr> {}
127    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
128    |
129    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
130    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
131
132 error: private trait `traits::PrivTr` in public interface (error E0445)
133   --> $DIR/private-in-public-warn.rs:58:9
134    |
135 LL |         type Alias: PrivTr;
136    |         ^^^^^^^^^^^^^^^^^^^
137    |
138    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
139    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
140
141 error: private trait `traits::PrivTr` in public interface (error E0445)
142   --> $DIR/private-in-public-warn.rs:61:9
143    |
144 LL |         fn f<T: PrivTr>(arg: T) {}
145    |         ^^^^^^^^^^^^^^^^^^^^^^^
146    |
147    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
148    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
149
150 error: private trait `traits::PrivTr` in public interface (error E0445)
151   --> $DIR/private-in-public-warn.rs:64:5
152    |
153 LL |     impl<T: PrivTr> Pub<T> {}
154    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
155    |
156    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
157    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
158
159 error: private trait `traits::PrivTr` in public interface (error E0445)
160   --> $DIR/private-in-public-warn.rs:66:5
161    |
162 LL |     impl<T: PrivTr> PubTr for Pub<T> {}
163    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
164    |
165    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
166    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
167
168 error: private trait `traits_where::PrivTr` in public interface (error E0445)
169   --> $DIR/private-in-public-warn.rs:75:5
170    |
171 LL |     pub type Alias<T> where T: PrivTr = T;
172    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
173    |
174    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
175    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
176
177 error: private trait `traits_where::PrivTr` in public interface (error E0445)
178   --> $DIR/private-in-public-warn.rs:79:5
179    |
180 LL |     pub trait Tr2<T> where T: PrivTr {}
181    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
182    |
183    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
184    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
185
186 error: private trait `traits_where::PrivTr` in public interface (error E0445)
187   --> $DIR/private-in-public-warn.rs:83:9
188    |
189 LL |         fn f<T>(arg: T) where T: PrivTr {}
190    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
191    |
192    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
193    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
194
195 error: private trait `traits_where::PrivTr` in public interface (error E0445)
196   --> $DIR/private-in-public-warn.rs:87:5
197    |
198 LL |     impl<T> Pub<T> where T: PrivTr {}
199    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
200    |
201    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
202    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
203
204 error: private trait `traits_where::PrivTr` in public interface (error E0445)
205   --> $DIR/private-in-public-warn.rs:90:5
206    |
207 LL |     impl<T> PubTr for Pub<T> where T: PrivTr {}
208    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
209    |
210    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
211    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
212
213 error: private trait `generics::PrivTr<generics::Pub>` in public interface (error E0445)
214   --> $DIR/private-in-public-warn.rs:101:5
215    |
216 LL |     pub trait Tr1: PrivTr<Pub> {}
217    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
218    |
219    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
220    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
221
222 error: private type `generics::Priv` in public interface (error E0446)
223   --> $DIR/private-in-public-warn.rs:104:5
224    |
225 LL |     pub trait Tr2: PubTr<Priv> {}
226    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
227    |
228    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
229    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
230
231 error: private type `generics::Priv` in public interface (error E0446)
232   --> $DIR/private-in-public-warn.rs:106:5
233    |
234 LL |     pub trait Tr3: PubTr<[Priv; 1]> {}
235    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
236    |
237    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
238    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
239
240 error: private type `generics::Priv` in public interface (error E0446)
241   --> $DIR/private-in-public-warn.rs:108:5
242    |
243 LL |     pub trait Tr4: PubTr<Pub<Priv>> {}
244    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
245    |
246    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
247    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
248
249 error[E0446]: private type `impls::Priv` in public interface
250   --> $DIR/private-in-public-warn.rs:135:9
251    |
252 LL |     struct Priv;
253    |     ------------ `impls::Priv` declared as private
254 ...
255 LL |         type Alias = Priv;
256    |         ^^^^^^^^^^^^^^^^^^ can't leak private type
257
258 error: private type `aliases_pub::Priv` in public interface (error E0446)
259   --> $DIR/private-in-public-warn.rs:206:9
260    |
261 LL |         pub fn f(arg: Priv) {}
262    |         ^^^^^^^^^^^^^^^^^^^
263    |
264    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
265    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
266
267 error[E0446]: private type `aliases_pub::Priv` in public interface
268   --> $DIR/private-in-public-warn.rs:210:9
269    |
270 LL |     struct Priv;
271    |     ------------ `aliases_pub::Priv` declared as private
272 ...
273 LL |         type Check = Priv;
274    |         ^^^^^^^^^^^^^^^^^^ can't leak private type
275
276 error[E0446]: private type `aliases_pub::Priv` in public interface
277   --> $DIR/private-in-public-warn.rs:213:9
278    |
279 LL |     struct Priv;
280    |     ------------ `aliases_pub::Priv` declared as private
281 ...
282 LL |         type Check = Priv;
283    |         ^^^^^^^^^^^^^^^^^^ can't leak private type
284
285 error[E0446]: private type `aliases_pub::Priv` in public interface
286   --> $DIR/private-in-public-warn.rs:216:9
287    |
288 LL |     struct Priv;
289    |     ------------ `aliases_pub::Priv` declared as private
290 ...
291 LL |         type Check = Priv;
292    |         ^^^^^^^^^^^^^^^^^^ can't leak private type
293
294 error[E0446]: private type `aliases_pub::Priv` in public interface
295   --> $DIR/private-in-public-warn.rs:219:9
296    |
297 LL |     struct Priv;
298    |     ------------ `aliases_pub::Priv` declared as private
299 ...
300 LL |         type Check = Priv;
301    |         ^^^^^^^^^^^^^^^^^^ can't leak private type
302
303 error: private trait `PrivTr1` in public interface (error E0445)
304   --> $DIR/private-in-public-warn.rs:249:5
305    |
306 LL |     pub trait Tr1: PrivUseAliasTr {}
307    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
308    |
309    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
310    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
311
312 error: private trait `PrivTr1<Priv2>` in public interface (error E0445)
313   --> $DIR/private-in-public-warn.rs:252:5
314    |
315 LL |     pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
316    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
317    |
318    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
319    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
320
321 error: private type `Priv2` in public interface (error E0446)
322   --> $DIR/private-in-public-warn.rs:252:5
323    |
324 LL |     pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
325    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
326    |
327    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
328    = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
329
330 warning: bounds on generic parameters are not enforced in type aliases
331   --> $DIR/private-in-public-warn.rs:50:23
332    |
333 LL |     pub type Alias<T: PrivTr> = T;
334    |                       ^^^^^^
335    |
336    = note: `#[warn(type_alias_bounds)]` on by default
337 help: the bound will not be checked when the type alias is used, and should be removed
338    |
339 LL -     pub type Alias<T: PrivTr> = T;
340 LL +     pub type Alias<T> = T;
341    | 
342
343 warning: where clauses are not enforced in type aliases
344   --> $DIR/private-in-public-warn.rs:75:29
345    |
346 LL |     pub type Alias<T> where T: PrivTr = T;
347    |                             ^^^^^^^^^
348    |
349 help: the clause will not be checked when the type alias is used, and should be removed
350    |
351 LL -     pub type Alias<T> where T: PrivTr = T;
352 LL +     pub type Alias<T>  = T;
353    | 
354
355 error: aborting due to 36 previous errors; 2 warnings emitted
356
357 For more information about this error, try `rustc --explain E0446`.