@@ -13,102 +13,184 @@ LL | #![deny(exported_private_dependencies)]
1313error: type `OtherType` from private dependency 'priv_dep' in public interface
1414 --> $DIR/pub-priv1.rs:36:5
1515 |
16+ LL | pub OtherType,
17+ | ^^^^^^^^^^^^^
18+
19+ error: type `OtherType` from private dependency 'priv_dep' in public interface
20+ --> $DIR/pub-priv1.rs:44:21
21+ |
22+ LL | ActualOtherType(OtherType, PubType),
23+ | ^^^^^^^^^
24+
25+ error: type `OtherType` from private dependency 'priv_dep' in public interface
26+ --> $DIR/pub-priv1.rs:47:9
27+ |
28+ LL | field: OtherType,
29+ | ^^^^^^^^^^^^^^^^
30+
31+ error: type `OtherType` from private dependency 'priv_dep' in public interface
32+ --> $DIR/pub-priv1.rs:54:1
33+ |
34+ LL | pub type ReexportedPublicGeneric = PublicGenericType<OtherType, ()>;
35+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36+
37+ error: type `OtherType` from private dependency 'priv_dep' in public interface
38+ --> $DIR/pub-priv1.rs:56:1
39+ |
40+ LL | pub type ReexportedPrivateGeneric = PublicGenericType<(), OtherType>;
41+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42+
43+ error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
44+ --> $DIR/pub-priv1.rs:59:1
45+ |
46+ LL | pub struct PublicGenericBoundedType<T: OtherTrait>(T);
47+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48+
49+ error: type `OtherType` from private dependency 'priv_dep' in public interface
50+ --> $DIR/pub-priv1.rs:63:5
51+ |
1652LL | pub fn pub_fn_param(param: OtherType) {}
1753 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1854
1955error: type `OtherType` from private dependency 'priv_dep' in public interface
20- --> $DIR/pub-priv1.rs:39 :5
56+ --> $DIR/pub-priv1.rs:66 :5
2157 |
2258LL | pub fn pub_fn_return() -> OtherType { OtherType }
2359 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2460
2561error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
26- --> $DIR/pub-priv1.rs:46 :5
62+ --> $DIR/pub-priv1.rs:73 :5
2763 |
2864LL | type Foo: OtherTrait;
2965 | ^^^^^^^^^^^^^^^^^^^^
3066
3167error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
32- --> $DIR/pub-priv1.rs:49 :22
68+ --> $DIR/pub-priv1.rs:76 :22
3369 |
3470LL | fn required() -> impl OtherTrait;
3571 | ^^^^^^^^^^^^^^^
3672
3773error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
38- --> $DIR/pub-priv1.rs:52 :22
74+ --> $DIR/pub-priv1.rs:79 :22
3975 |
4076LL | fn provided() -> impl OtherTrait { OtherType }
4177 | ^^^^^^^^^^^^^^^
4278
4379error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
44- --> $DIR/pub-priv1.rs:52 :22
80+ --> $DIR/pub-priv1.rs:79 :22
4581 |
4682LL | fn provided() -> impl OtherTrait { OtherType }
4783 | ^^^^^^^^^^^^^^^
4884 |
4985 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
5086
5187error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
52- --> $DIR/pub-priv1.rs:57 :1
88+ --> $DIR/pub-priv1.rs:84 :1
5389 |
5490LL | pub trait WithSuperTrait: OtherTrait {}
5591 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5692
5793error: type `OtherType` from private dependency 'priv_dep' in public interface
58- --> $DIR/pub-priv1.rs:66 :5
94+ --> $DIR/pub-priv1.rs:93 :5
5995 |
6096LL | type X = OtherType;
6197 | ^^^^^^
6298
6399error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
64- --> $DIR/pub-priv1.rs:70 :1
100+ --> $DIR/pub-priv1.rs:97 :1
65101 |
66102LL | pub fn in_bounds<T: OtherTrait>(x: T) { unimplemented!() }
67103 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68104
69105error: type `OtherType` from private dependency 'priv_dep' in public interface
70- --> $DIR/pub-priv1.rs:73 :1
106+ --> $DIR/pub-priv1.rs:100 :1
71107 |
72108LL | pub fn private_in_generic() -> std::num::Saturating<OtherType> { unimplemented!() }
73109 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74110
75111error: type `OtherType` from private dependency 'priv_dep' in public interface
76- --> $DIR/pub-priv1.rs:76 :1
112+ --> $DIR/pub-priv1.rs:103 :1
77113 |
78114LL | pub static STATIC: OtherType = OtherType;
79115 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80116
81117error: type `OtherType` from private dependency 'priv_dep' in public interface
82- --> $DIR/pub-priv1.rs:79 :1
118+ --> $DIR/pub-priv1.rs:106 :1
83119 |
84120LL | pub const CONST: OtherType = OtherType;
85121 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
86122
87123error: type `OtherType` from private dependency 'priv_dep' in public interface
88- --> $DIR/pub-priv1.rs:82 :1
124+ --> $DIR/pub-priv1.rs:109 :1
89125 |
90126LL | pub type Alias = OtherType;
91127 | ^^^^^^^^^^^^^^
92128
129+ error: type `OtherType` from private dependency 'priv_dep' in public interface
130+ --> $DIR/pub-priv1.rs:112:1
131+ |
132+ LL | pub type AliasOfAlias = priv_dep::PubPub;
133+ | ^^^^^^^^^^^^^^^^^^^^^
134+
93135error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
94- --> $DIR/pub-priv1.rs:87 :1
136+ --> $DIR/pub-priv1.rs:117 :1
95137 |
96138LL | impl OtherTrait for PublicWithPrivateImpl {}
97139 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98140
99141error: type `OtherType` from private dependency 'priv_dep' in public interface
100- --> $DIR/pub-priv1.rs:92 :1
142+ --> $DIR/pub-priv1.rs:122 :1
101143 |
102144LL | impl PubTraitOnPrivate for OtherType {}
103145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104146
105147error: type `OtherType` from private dependency 'priv_dep' in public interface
106- --> $DIR/pub-priv1.rs:92 :1
148+ --> $DIR/pub-priv1.rs:122 :1
107149 |
108150LL | impl PubTraitOnPrivate for OtherType {}
109151 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110152 |
111153 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
112154
113- error: aborting due to 17 previous errors
155+ error: type `OtherType` from private dependency 'priv_dep' in public interface
156+ --> $DIR/pub-priv1.rs:128:1
157+ |
158+ LL | impl From<OtherType> for PublicWithStdImpl {
159+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160+
161+ error: type `OtherType` from private dependency 'priv_dep' in public interface
162+ --> $DIR/pub-priv1.rs:130:5
163+ |
164+ LL | fn from(val: OtherType) -> Self { Self }
165+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
166+
167+ error: type `OtherType` from private dependency 'priv_dep' in public interface
168+ --> $DIR/pub-priv1.rs:134:1
169+ |
170+ LL | impl From<PublicWithStdImpl> for OtherType {
171+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
172+
173+ error: type `OtherType` from private dependency 'priv_dep' in public interface
174+ --> $DIR/pub-priv1.rs:134:1
175+ |
176+ LL | impl From<PublicWithStdImpl> for OtherType {
177+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
178+ |
179+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
180+
181+ error: type `OtherType` from private dependency 'priv_dep' in public interface
182+ --> $DIR/pub-priv1.rs:137:5
183+ |
184+ LL | fn from(val: PublicWithStdImpl) -> Self { Self }
185+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186+
187+ error: type `OtherType` from private dependency 'priv_dep' in public interface
188+ --> $DIR/pub-priv1.rs:137:5
189+ |
190+ LL | fn from(val: PublicWithStdImpl) -> Self { Self }
191+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
192+ |
193+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
194+
195+ error: aborting due to 30 previous errors
114196
0 commit comments