@@ -130,7 +130,7 @@ LL | type Alias = Priv;
130130 | ^^^^^^^^^^ can't leak private type
131131
132132error: trait `traits::PrivTr` is more private than the item `traits::Alias`
133- --> $DIR/private-in-public-warn.rs:41 :5
133+ --> $DIR/private-in-public-warn.rs:42 :5
134134 |
135135LL | pub type Alias<T: PrivTr> = T;
136136 | ^^^^^^^^^^^^^^^^^^^^^^^^^ type alias `traits::Alias` is reachable at visibility `pub(crate)`
@@ -147,7 +147,7 @@ LL | #![deny(private_interfaces, private_bounds)]
147147 | ^^^^^^^^^^^^^^
148148
149149error: trait `traits::PrivTr` is more private than the item `traits::Tr1`
150- --> $DIR/private-in-public-warn.rs:43 :5
150+ --> $DIR/private-in-public-warn.rs:44 :5
151151 |
152152LL | pub trait Tr1: PrivTr {}
153153 | ^^^^^^^^^^^^^^^^^^^^^ trait `traits::Tr1` is reachable at visibility `pub(crate)`
@@ -159,7 +159,7 @@ LL | trait PrivTr {}
159159 | ^^^^^^^^^^^^
160160
161161error: trait `traits::PrivTr` is more private than the item `traits::Tr2`
162- --> $DIR/private-in-public-warn.rs:44 :5
162+ --> $DIR/private-in-public-warn.rs:45 :5
163163 |
164164LL | pub trait Tr2<T: PrivTr> {}
165165 | ^^^^^^^^^^^^^^^^^^^^^^^^ trait `traits::Tr2` is reachable at visibility `pub(crate)`
@@ -171,7 +171,7 @@ LL | trait PrivTr {}
171171 | ^^^^^^^^^^^^
172172
173173error: trait `traits::PrivTr` is more private than the item `traits::Tr3::Alias`
174- --> $DIR/private-in-public-warn.rs:46 :9
174+ --> $DIR/private-in-public-warn.rs:47 :9
175175 |
176176LL | type Alias: PrivTr;
177177 | ^^^^^^^^^^^^^^^^^^ associated type `traits::Tr3::Alias` is reachable at visibility `pub(crate)`
@@ -183,7 +183,7 @@ LL | trait PrivTr {}
183183 | ^^^^^^^^^^^^
184184
185185error: trait `traits::PrivTr` is more private than the item `traits::Tr3::f`
186- --> $DIR/private-in-public-warn.rs:48 :9
186+ --> $DIR/private-in-public-warn.rs:49 :9
187187 |
188188LL | fn f<T: PrivTr>(arg: T) {}
189189 | ^^^^^^^^^^^^^^^^^^^^^^^ associated function `traits::Tr3::f` is reachable at visibility `pub(crate)`
@@ -195,7 +195,7 @@ LL | trait PrivTr {}
195195 | ^^^^^^^^^^^^
196196
197197error: trait `traits::PrivTr` is more private than the item `traits::Pub<T>`
198- --> $DIR/private-in-public-warn.rs:50 :5
198+ --> $DIR/private-in-public-warn.rs:54 :5
199199 |
200200LL | impl<T: PrivTr> Pub<T> {}
201201 | ^^^^^^^^^^^^^^^^^^^^^^ implementation `traits::Pub<T>` is reachable at visibility `pub(crate)`
@@ -207,103 +207,103 @@ LL | trait PrivTr {}
207207 | ^^^^^^^^^^^^
208208
209209error: trait `traits_where::PrivTr` is more private than the item `traits_where::Alias`
210- --> $DIR/private-in-public-warn.rs:59 :5
210+ --> $DIR/private-in-public-warn.rs:63 :5
211211 |
212212LL | pub type Alias<T> where T: PrivTr = T;
213213 | ^^^^^^^^^^^^^^^^^ type alias `traits_where::Alias` is reachable at visibility `pub(crate)`
214214 |
215215note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)`
216- --> $DIR/private-in-public-warn.rs:55 :5
216+ --> $DIR/private-in-public-warn.rs:59 :5
217217 |
218218LL | trait PrivTr {}
219219 | ^^^^^^^^^^^^
220220
221221error: trait `traits_where::PrivTr` is more private than the item `traits_where::Tr2`
222- --> $DIR/private-in-public-warn.rs:62 :5
222+ --> $DIR/private-in-public-warn.rs:66 :5
223223 |
224224LL | pub trait Tr2<T> where T: PrivTr {}
225225 | ^^^^^^^^^^^^^^^^ trait `traits_where::Tr2` is reachable at visibility `pub(crate)`
226226 |
227227note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)`
228- --> $DIR/private-in-public-warn.rs:55 :5
228+ --> $DIR/private-in-public-warn.rs:59 :5
229229 |
230230LL | trait PrivTr {}
231231 | ^^^^^^^^^^^^
232232
233233error: trait `traits_where::PrivTr` is more private than the item `traits_where::Tr3::f`
234- --> $DIR/private-in-public-warn.rs:65 :9
234+ --> $DIR/private-in-public-warn.rs:69 :9
235235 |
236236LL | fn f<T>(arg: T) where T: PrivTr {}
237237 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `traits_where::Tr3::f` is reachable at visibility `pub(crate)`
238238 |
239239note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)`
240- --> $DIR/private-in-public-warn.rs:55 :5
240+ --> $DIR/private-in-public-warn.rs:59 :5
241241 |
242242LL | trait PrivTr {}
243243 | ^^^^^^^^^^^^
244244
245245error: trait `traits_where::PrivTr` is more private than the item `traits_where::Pub<T>`
246- --> $DIR/private-in-public-warn.rs:68 :5
246+ --> $DIR/private-in-public-warn.rs:72 :5
247247 |
248248LL | impl<T> Pub<T> where T: PrivTr {}
249249 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation `traits_where::Pub<T>` is reachable at visibility `pub(crate)`
250250 |
251251note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)`
252- --> $DIR/private-in-public-warn.rs:55 :5
252+ --> $DIR/private-in-public-warn.rs:59 :5
253253 |
254254LL | trait PrivTr {}
255255 | ^^^^^^^^^^^^
256256
257257error: trait `generics::PrivTr<generics::Pub>` is more private than the item `generics::Tr1`
258- --> $DIR/private-in-public-warn.rs:79 :5
258+ --> $DIR/private-in-public-warn.rs:84 :5
259259 |
260260LL | pub trait Tr1: PrivTr<Pub> {}
261261 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `generics::Tr1` is reachable at visibility `pub(crate)`
262262 |
263263note: but trait `generics::PrivTr<generics::Pub>` is only usable at visibility `pub(self)`
264- --> $DIR/private-in-public-warn.rs:76 :5
264+ --> $DIR/private-in-public-warn.rs:80 :5
265265 |
266266LL | trait PrivTr<T> {}
267267 | ^^^^^^^^^^^^^^^
268268
269269error: type `generics::Priv` is more private than the item `generics::Tr2`
270- --> $DIR/private-in-public-warn.rs:81 :5
270+ --> $DIR/private-in-public-warn.rs:86 :5
271271 |
272272LL | pub trait Tr2: PubTr<Priv> {}
273273 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `generics::Tr2` is reachable at visibility `pub(crate)`
274274 |
275275note: but type `generics::Priv` is only usable at visibility `pub(self)`
276- --> $DIR/private-in-public-warn.rs:74 :5
276+ --> $DIR/private-in-public-warn.rs:78 :5
277277 |
278278LL | struct Priv<T = u8>(T);
279279 | ^^^^^^^^^^^^^^^^^^^
280280
281281error: type `generics::Priv` is more private than the item `generics::Tr3`
282- --> $DIR/private-in-public-warn.rs:82 :5
282+ --> $DIR/private-in-public-warn.rs:87 :5
283283 |
284284LL | pub trait Tr3: PubTr<[Priv; 1]> {}
285285 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `generics::Tr3` is reachable at visibility `pub(crate)`
286286 |
287287note: but type `generics::Priv` is only usable at visibility `pub(self)`
288- --> $DIR/private-in-public-warn.rs:74 :5
288+ --> $DIR/private-in-public-warn.rs:78 :5
289289 |
290290LL | struct Priv<T = u8>(T);
291291 | ^^^^^^^^^^^^^^^^^^^
292292
293293error: type `generics::Priv` is more private than the item `Tr4`
294- --> $DIR/private-in-public-warn.rs:83 :5
294+ --> $DIR/private-in-public-warn.rs:88 :5
295295 |
296296LL | pub trait Tr4: PubTr<Pub<Priv>> {}
297297 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `Tr4` is reachable at visibility `pub(crate)`
298298 |
299299note: but type `generics::Priv` is only usable at visibility `pub(self)`
300- --> $DIR/private-in-public-warn.rs:74 :5
300+ --> $DIR/private-in-public-warn.rs:78 :5
301301 |
302302LL | struct Priv<T = u8>(T);
303303 | ^^^^^^^^^^^^^^^^^^^
304304
305305error[E0446]: private type `impls::Priv` in public interface
306- --> $DIR/private-in-public-warn.rs:109 :9
306+ --> $DIR/private-in-public-warn.rs:119 :9
307307 |
308308LL | struct Priv;
309309 | ----------- `impls::Priv` declared as private
@@ -312,19 +312,19 @@ LL | type Alias = Priv;
312312 | ^^^^^^^^^^ can't leak private type
313313
314314error: type `aliases_pub::Priv` is more private than the item `aliases_pub::<impl Pub2>::f`
315- --> $DIR/private-in-public-warn.rs:180 :9
315+ --> $DIR/private-in-public-warn.rs:190 :9
316316 |
317317LL | pub fn f(arg: Priv) {}
318318 | ^^^^^^^^^^^^^^^^^^^ associated function `aliases_pub::<impl Pub2>::f` is reachable at visibility `pub(crate)`
319319 |
320320note: but type `aliases_pub::Priv` is only usable at visibility `pub(self)`
321- --> $DIR/private-in-public-warn.rs:153 :5
321+ --> $DIR/private-in-public-warn.rs:163 :5
322322 |
323323LL | struct Priv;
324324 | ^^^^^^^^^^^
325325
326326error[E0446]: private type `aliases_pub::Priv` in public interface
327- --> $DIR/private-in-public-warn.rs:183 :9
327+ --> $DIR/private-in-public-warn.rs:193 :9
328328 |
329329LL | struct Priv;
330330 | ----------- `aliases_pub::Priv` declared as private
@@ -333,7 +333,7 @@ LL | type Check = Priv;
333333 | ^^^^^^^^^^ can't leak private type
334334
335335error[E0446]: private type `aliases_pub::Priv` in public interface
336- --> $DIR/private-in-public-warn.rs:186 :9
336+ --> $DIR/private-in-public-warn.rs:196 :9
337337 |
338338LL | struct Priv;
339339 | ----------- `aliases_pub::Priv` declared as private
@@ -342,7 +342,7 @@ LL | type Check = Priv;
342342 | ^^^^^^^^^^ can't leak private type
343343
344344error[E0446]: private type `aliases_pub::Priv` in public interface
345- --> $DIR/private-in-public-warn.rs:189 :9
345+ --> $DIR/private-in-public-warn.rs:199 :9
346346 |
347347LL | struct Priv;
348348 | ----------- `aliases_pub::Priv` declared as private
@@ -351,7 +351,7 @@ LL | type Check = Priv;
351351 | ^^^^^^^^^^ can't leak private type
352352
353353error[E0446]: private type `aliases_pub::Priv` in public interface
354- --> $DIR/private-in-public-warn.rs:192 :9
354+ --> $DIR/private-in-public-warn.rs:202 :9
355355 |
356356LL | struct Priv;
357357 | ----------- `aliases_pub::Priv` declared as private
@@ -360,43 +360,43 @@ LL | type Check = Priv;
360360 | ^^^^^^^^^^ can't leak private type
361361
362362error: trait `PrivTr1` is more private than the item `aliases_priv::Tr1`
363- --> $DIR/private-in-public-warn.rs:222 :5
363+ --> $DIR/private-in-public-warn.rs:232 :5
364364 |
365365LL | pub trait Tr1: PrivUseAliasTr {}
366366 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `aliases_priv::Tr1` is reachable at visibility `pub(crate)`
367367 |
368368note: but trait `PrivTr1` is only usable at visibility `pub(self)`
369- --> $DIR/private-in-public-warn.rs:208 :5
369+ --> $DIR/private-in-public-warn.rs:218 :5
370370 |
371371LL | trait PrivTr1<T = u8> {
372372 | ^^^^^^^^^^^^^^^^^^^^^
373373
374374error: trait `PrivTr1<Priv2>` is more private than the item `aliases_priv::Tr2`
375- --> $DIR/private-in-public-warn.rs:224 :5
375+ --> $DIR/private-in-public-warn.rs:234 :5
376376 |
377377LL | pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
378378 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `aliases_priv::Tr2` is reachable at visibility `pub(crate)`
379379 |
380380note: but trait `PrivTr1<Priv2>` is only usable at visibility `pub(self)`
381- --> $DIR/private-in-public-warn.rs:208 :5
381+ --> $DIR/private-in-public-warn.rs:218 :5
382382 |
383383LL | trait PrivTr1<T = u8> {
384384 | ^^^^^^^^^^^^^^^^^^^^^
385385
386386error: type `Priv2` is more private than the item `aliases_priv::Tr2`
387- --> $DIR/private-in-public-warn.rs:224 :5
387+ --> $DIR/private-in-public-warn.rs:234 :5
388388 |
389389LL | pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
390390 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `aliases_priv::Tr2` is reachable at visibility `pub(crate)`
391391 |
392392note: but type `Priv2` is only usable at visibility `pub(self)`
393- --> $DIR/private-in-public-warn.rs:206 :5
393+ --> $DIR/private-in-public-warn.rs:216 :5
394394 |
395395LL | struct Priv2;
396396 | ^^^^^^^^^^^^
397397
398398warning: bounds on generic parameters in type aliases are not enforced
399- --> $DIR/private-in-public-warn.rs:41 :23
399+ --> $DIR/private-in-public-warn.rs:42 :23
400400 |
401401LL | pub type Alias<T: PrivTr> = T;
402402 | --^^^^^^
@@ -410,7 +410,7 @@ LL | pub type Alias<T: PrivTr> = T;
410410 = note: `#[warn(type_alias_bounds)]` on by default
411411
412412warning: where clauses on type aliases are not enforced
413- --> $DIR/private-in-public-warn.rs:59 :29
413+ --> $DIR/private-in-public-warn.rs:63 :29
414414 |
415415LL | pub type Alias<T> where T: PrivTr = T;
416416 | ------^^^^^^^^^
0 commit comments