@@ -130,7 +130,7 @@ LL | type Alias = Priv;
130
130
| ^^^^^^^^^^ can't leak private type
131
131
132
132
error: 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
134
134
|
135
135
LL | pub type Alias<T: PrivTr> = T;
136
136
| ^^^^^^^^^^^^^^^^^^^^^^^^^ type alias `traits::Alias` is reachable at visibility `pub(crate)`
@@ -147,7 +147,7 @@ LL | #![deny(private_interfaces, private_bounds)]
147
147
| ^^^^^^^^^^^^^^
148
148
149
149
error: 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
151
151
|
152
152
LL | pub trait Tr1: PrivTr {}
153
153
| ^^^^^^^^^^^^^^^^^^^^^ trait `traits::Tr1` is reachable at visibility `pub(crate)`
@@ -159,7 +159,7 @@ LL | trait PrivTr {}
159
159
| ^^^^^^^^^^^^
160
160
161
161
error: 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
163
163
|
164
164
LL | pub trait Tr2<T: PrivTr> {}
165
165
| ^^^^^^^^^^^^^^^^^^^^^^^^ trait `traits::Tr2` is reachable at visibility `pub(crate)`
@@ -171,7 +171,7 @@ LL | trait PrivTr {}
171
171
| ^^^^^^^^^^^^
172
172
173
173
error: 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
175
175
|
176
176
LL | type Alias: PrivTr;
177
177
| ^^^^^^^^^^^^^^^^^^ associated type `traits::Tr3::Alias` is reachable at visibility `pub(crate)`
@@ -183,7 +183,7 @@ LL | trait PrivTr {}
183
183
| ^^^^^^^^^^^^
184
184
185
185
error: 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
187
187
|
188
188
LL | fn f<T: PrivTr>(arg: T) {}
189
189
| ^^^^^^^^^^^^^^^^^^^^^^^ associated function `traits::Tr3::f` is reachable at visibility `pub(crate)`
@@ -195,7 +195,7 @@ LL | trait PrivTr {}
195
195
| ^^^^^^^^^^^^
196
196
197
197
error: 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
199
199
|
200
200
LL | impl<T: PrivTr> Pub<T> {}
201
201
| ^^^^^^^^^^^^^^^^^^^^^^ implementation `traits::Pub<T>` is reachable at visibility `pub(crate)`
@@ -207,103 +207,103 @@ LL | trait PrivTr {}
207
207
| ^^^^^^^^^^^^
208
208
209
209
error: 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
211
211
|
212
212
LL | pub type Alias<T> where T: PrivTr = T;
213
213
| ^^^^^^^^^^^^^^^^^ type alias `traits_where::Alias` is reachable at visibility `pub(crate)`
214
214
|
215
215
note: 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
217
217
|
218
218
LL | trait PrivTr {}
219
219
| ^^^^^^^^^^^^
220
220
221
221
error: 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
223
223
|
224
224
LL | pub trait Tr2<T> where T: PrivTr {}
225
225
| ^^^^^^^^^^^^^^^^ trait `traits_where::Tr2` is reachable at visibility `pub(crate)`
226
226
|
227
227
note: 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
229
229
|
230
230
LL | trait PrivTr {}
231
231
| ^^^^^^^^^^^^
232
232
233
233
error: 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
235
235
|
236
236
LL | fn f<T>(arg: T) where T: PrivTr {}
237
237
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `traits_where::Tr3::f` is reachable at visibility `pub(crate)`
238
238
|
239
239
note: 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
241
241
|
242
242
LL | trait PrivTr {}
243
243
| ^^^^^^^^^^^^
244
244
245
245
error: 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
247
247
|
248
248
LL | impl<T> Pub<T> where T: PrivTr {}
249
249
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation `traits_where::Pub<T>` is reachable at visibility `pub(crate)`
250
250
|
251
251
note: 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
253
253
|
254
254
LL | trait PrivTr {}
255
255
| ^^^^^^^^^^^^
256
256
257
257
error: 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
259
259
|
260
260
LL | pub trait Tr1: PrivTr<Pub> {}
261
261
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `generics::Tr1` is reachable at visibility `pub(crate)`
262
262
|
263
263
note: 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
265
265
|
266
266
LL | trait PrivTr<T> {}
267
267
| ^^^^^^^^^^^^^^^
268
268
269
269
error: 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
271
271
|
272
272
LL | pub trait Tr2: PubTr<Priv> {}
273
273
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `generics::Tr2` is reachable at visibility `pub(crate)`
274
274
|
275
275
note: 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
277
277
|
278
278
LL | struct Priv<T = u8>(T);
279
279
| ^^^^^^^^^^^^^^^^^^^
280
280
281
281
error: 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
283
283
|
284
284
LL | pub trait Tr3: PubTr<[Priv; 1]> {}
285
285
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `generics::Tr3` is reachable at visibility `pub(crate)`
286
286
|
287
287
note: 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
289
289
|
290
290
LL | struct Priv<T = u8>(T);
291
291
| ^^^^^^^^^^^^^^^^^^^
292
292
293
293
error: 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
295
295
|
296
296
LL | pub trait Tr4: PubTr<Pub<Priv>> {}
297
297
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `Tr4` is reachable at visibility `pub(crate)`
298
298
|
299
299
note: 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
301
301
|
302
302
LL | struct Priv<T = u8>(T);
303
303
| ^^^^^^^^^^^^^^^^^^^
304
304
305
305
error[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
307
307
|
308
308
LL | struct Priv;
309
309
| ----------- `impls::Priv` declared as private
@@ -312,19 +312,19 @@ LL | type Alias = Priv;
312
312
| ^^^^^^^^^^ can't leak private type
313
313
314
314
error: 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
316
316
|
317
317
LL | pub fn f(arg: Priv) {}
318
318
| ^^^^^^^^^^^^^^^^^^^ associated function `aliases_pub::<impl Pub2>::f` is reachable at visibility `pub(crate)`
319
319
|
320
320
note: 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
322
322
|
323
323
LL | struct Priv;
324
324
| ^^^^^^^^^^^
325
325
326
326
error[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
328
328
|
329
329
LL | struct Priv;
330
330
| ----------- `aliases_pub::Priv` declared as private
@@ -333,7 +333,7 @@ LL | type Check = Priv;
333
333
| ^^^^^^^^^^ can't leak private type
334
334
335
335
error[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
337
337
|
338
338
LL | struct Priv;
339
339
| ----------- `aliases_pub::Priv` declared as private
@@ -342,7 +342,7 @@ LL | type Check = Priv;
342
342
| ^^^^^^^^^^ can't leak private type
343
343
344
344
error[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
346
346
|
347
347
LL | struct Priv;
348
348
| ----------- `aliases_pub::Priv` declared as private
@@ -351,7 +351,7 @@ LL | type Check = Priv;
351
351
| ^^^^^^^^^^ can't leak private type
352
352
353
353
error[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
355
355
|
356
356
LL | struct Priv;
357
357
| ----------- `aliases_pub::Priv` declared as private
@@ -360,43 +360,43 @@ LL | type Check = Priv;
360
360
| ^^^^^^^^^^ can't leak private type
361
361
362
362
error: 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
364
364
|
365
365
LL | pub trait Tr1: PrivUseAliasTr {}
366
366
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `aliases_priv::Tr1` is reachable at visibility `pub(crate)`
367
367
|
368
368
note: 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
370
370
|
371
371
LL | trait PrivTr1<T = u8> {
372
372
| ^^^^^^^^^^^^^^^^^^^^^
373
373
374
374
error: 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
376
376
|
377
377
LL | pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
378
378
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `aliases_priv::Tr2` is reachable at visibility `pub(crate)`
379
379
|
380
380
note: 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
382
382
|
383
383
LL | trait PrivTr1<T = u8> {
384
384
| ^^^^^^^^^^^^^^^^^^^^^
385
385
386
386
error: 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
388
388
|
389
389
LL | pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
390
390
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `aliases_priv::Tr2` is reachable at visibility `pub(crate)`
391
391
|
392
392
note: 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
394
394
|
395
395
LL | struct Priv2;
396
396
| ^^^^^^^^^^^^
397
397
398
398
warning: 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
400
400
|
401
401
LL | pub type Alias<T: PrivTr> = T;
402
402
| --^^^^^^
@@ -410,7 +410,7 @@ LL | pub type Alias<T: PrivTr> = T;
410
410
= note: `#[warn(type_alias_bounds)]` on by default
411
411
412
412
warning: 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
414
414
|
415
415
LL | pub type Alias<T> where T: PrivTr = T;
416
416
| ------^^^^^^^^^
0 commit comments