@@ -11,35 +11,59 @@ LL | #![deny(exported_private_dependencies)]
1111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
1313error: macro `m` from private dependency 'priv_dep' is re-exported
14- --> $DIR/pub-priv1.rs:98 :9
14+ --> $DIR/pub-priv1.rs:156 :9
1515 |
1616LL | pub use priv_dep::m;
1717 | ^^^^^^^^^^^
1818
1919error: macro `fn_like` from private dependency 'pm' is re-exported
20- --> $DIR/pub-priv1.rs:100 :9
20+ --> $DIR/pub-priv1.rs:158 :9
2121 |
2222LL | pub use pm::fn_like;
2323 | ^^^^^^^^^^^
2424
2525error: derive macro `PmDerive` from private dependency 'pm' is re-exported
26- --> $DIR/pub-priv1.rs:102 :9
26+ --> $DIR/pub-priv1.rs:160 :9
2727 |
2828LL | pub use pm::PmDerive;
2929 | ^^^^^^^^^^^^
3030
3131error: attribute macro `pm_attr` from private dependency 'pm' is re-exported
32- --> $DIR/pub-priv1.rs:104 :9
32+ --> $DIR/pub-priv1.rs:162 :9
3333 |
3434LL | pub use pm::pm_attr;
3535 | ^^^^^^^^^^^
3636
3737error: variant `V1` from private dependency 'priv_dep' is re-exported
38- --> $DIR/pub-priv1.rs:107 :9
38+ --> $DIR/pub-priv1.rs:165 :9
3939 |
4040LL | pub use priv_dep::E::V1;
4141 | ^^^^^^^^^^^^^^^
4242
43+ error: type alias `Unit` from private dependency 'priv_dep' is re-exported
44+ --> $DIR/pub-priv1.rs:168:9
45+ |
46+ LL | pub use priv_dep::Unit;
47+ | ^^^^^^^^^^^^^^
48+
49+ error: type alias `PubPub` from private dependency 'priv_dep' is re-exported
50+ --> $DIR/pub-priv1.rs:170:9
51+ |
52+ LL | pub use priv_dep::PubPub;
53+ | ^^^^^^^^^^^^^^^^
54+
55+ error: type alias `PubPriv` from private dependency 'priv_dep' is re-exported
56+ --> $DIR/pub-priv1.rs:172:9
57+ |
58+ LL | pub use priv_dep::PubPriv;
59+ | ^^^^^^^^^^^^^^^^^
60+
61+ error: struct `Renamed` from private dependency 'priv_dep' is re-exported
62+ --> $DIR/pub-priv1.rs:174:9
63+ |
64+ LL | pub use priv_dep::OtherType as Renamed;
65+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66+
4367error: type `OtherType` from private dependency 'priv_dep' in public interface
4468 --> $DIR/pub-priv1.rs:29:5
4569 |
@@ -49,82 +73,188 @@ LL | pub field: OtherType,
4973error: type `OtherType` from private dependency 'priv_dep' in public interface
5074 --> $DIR/pub-priv1.rs:36:5
5175 |
76+ LL | pub OtherType,
77+ | ^^^^^^^^^^^^^
78+
79+ error: type `OtherType` from private dependency 'priv_dep' in public interface
80+ --> $DIR/pub-priv1.rs:44:21
81+ |
82+ LL | ActualOtherType(OtherType, PubType),
83+ | ^^^^^^^^^
84+
85+ error: type `OtherType` from private dependency 'priv_dep' in public interface
86+ --> $DIR/pub-priv1.rs:47:9
87+ |
88+ LL | field: OtherType,
89+ | ^^^^^^^^^^^^^^^^
90+
91+ error: type `OtherType` from private dependency 'priv_dep' in public interface
92+ --> $DIR/pub-priv1.rs:54:1
93+ |
94+ LL | pub type ReexportedPublicGeneric = PublicGenericType<OtherType, ()>;
95+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96+
97+ error: type `OtherType` from private dependency 'priv_dep' in public interface
98+ --> $DIR/pub-priv1.rs:56:1
99+ |
100+ LL | pub type ReexportedPrivateGeneric = PublicGenericType<(), OtherType>;
101+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102+
103+ error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
104+ --> $DIR/pub-priv1.rs:59:1
105+ |
106+ LL | pub struct PublicGenericBoundedType<T: OtherTrait>(T);
107+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108+
109+ error: type `OtherType` from private dependency 'priv_dep' in public interface
110+ --> $DIR/pub-priv1.rs:63:5
111+ |
52112LL | pub fn pub_fn_param(param: OtherType) {}
53113 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54114
55115error: type `OtherType` from private dependency 'priv_dep' in public interface
56- --> $DIR/pub-priv1.rs:39 :5
116+ --> $DIR/pub-priv1.rs:66 :5
57117 |
58118LL | pub fn pub_fn_return() -> OtherType { OtherType }
59119 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60120
61121error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
62- --> $DIR/pub-priv1.rs:46 :5
122+ --> $DIR/pub-priv1.rs:73 :5
63123 |
64124LL | type Foo: OtherTrait;
65125 | ^^^^^^^^^^^^^^^^^^^^
66126
127+ error: type `OtherType` from private dependency 'priv_dep' in public interface
128+ --> $DIR/pub-priv1.rs:80:5
129+ |
130+ LL | fn required_concrete() -> OtherType;
131+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132+
133+ error: type `OtherType` from private dependency 'priv_dep' in public interface
134+ --> $DIR/pub-priv1.rs:83:5
135+ |
136+ LL | fn provided_concrete() -> OtherType { OtherType }
137+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
138+
67139error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
68- --> $DIR/pub-priv1.rs:54 :1
140+ --> $DIR/pub-priv1.rs:87 :1
69141 |
70142LL | pub trait WithSuperTrait: OtherTrait {}
71143 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72144
73145error: type `OtherType` from private dependency 'priv_dep' in public interface
74- --> $DIR/pub-priv1.rs:63 :5
146+ --> $DIR/pub-priv1.rs:96 :5
75147 |
76148LL | type X = OtherType;
77149 | ^^^^^^
78150
79151error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
80- --> $DIR/pub-priv1.rs:67 :1
152+ --> $DIR/pub-priv1.rs:100 :1
81153 |
82154LL | pub fn in_bounds<T: OtherTrait>(x: T) { unimplemented!() }
83155 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84156
157+ error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
158+ --> $DIR/pub-priv1.rs:103:1
159+ |
160+ LL | pub fn private_return_impl_trait() -> impl OtherTrait { OtherType }
161+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
162+
163+ error: type `OtherType` from private dependency 'priv_dep' in public interface
164+ --> $DIR/pub-priv1.rs:106:1
165+ |
166+ LL | pub fn private_return() -> OtherType { OtherType }
167+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
168+
85169error: type `OtherType` from private dependency 'priv_dep' in public interface
86- --> $DIR/pub-priv1.rs:70 :1
170+ --> $DIR/pub-priv1.rs:109 :1
87171 |
88172LL | pub fn private_in_generic() -> std::num::Saturating<OtherType> { unimplemented!() }
89173 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90174
91175error: type `OtherType` from private dependency 'priv_dep' in public interface
92- --> $DIR/pub-priv1.rs:73 :1
176+ --> $DIR/pub-priv1.rs:112 :1
93177 |
94178LL | pub static STATIC: OtherType = OtherType;
95179 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96180
97181error: type `OtherType` from private dependency 'priv_dep' in public interface
98- --> $DIR/pub-priv1.rs:76 :1
182+ --> $DIR/pub-priv1.rs:115 :1
99183 |
100184LL | pub const CONST: OtherType = OtherType;
101185 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
102186
103187error: type `OtherType` from private dependency 'priv_dep' in public interface
104- --> $DIR/pub-priv1.rs:79 :1
188+ --> $DIR/pub-priv1.rs:118 :1
105189 |
106190LL | pub type Alias = OtherType;
107191 | ^^^^^^^^^^^^^^
108192
193+ error: type `OtherType` from private dependency 'priv_dep' in public interface
194+ --> $DIR/pub-priv1.rs:121:1
195+ |
196+ LL | pub type AliasOfAlias = priv_dep::PubPub;
197+ | ^^^^^^^^^^^^^^^^^^^^^
198+
109199error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
110- --> $DIR/pub-priv1.rs:84 :1
200+ --> $DIR/pub-priv1.rs:126 :1
111201 |
112202LL | impl OtherTrait for PublicWithPrivateImpl {}
113203 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114204
115205error: type `OtherType` from private dependency 'priv_dep' in public interface
116- --> $DIR/pub-priv1.rs:89 :1
206+ --> $DIR/pub-priv1.rs:131 :1
117207 |
118208LL | impl PubTraitOnPrivate for OtherType {}
119209 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120210
121211error: type `OtherType` from private dependency 'priv_dep' in public interface
122- --> $DIR/pub-priv1.rs:89 :1
212+ --> $DIR/pub-priv1.rs:131 :1
123213 |
124214LL | impl PubTraitOnPrivate for OtherType {}
125215 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126216 |
127217 = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
128218
129- error: aborting due to 20 previous errors
219+ error: type `OtherType` from private dependency 'priv_dep' in public interface
220+ --> $DIR/pub-priv1.rs:137:1
221+ |
222+ LL | impl From<OtherType> for PublicWithStdImpl {
223+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
224+
225+ error: type `OtherType` from private dependency 'priv_dep' in public interface
226+ --> $DIR/pub-priv1.rs:139:5
227+ |
228+ LL | fn from(val: OtherType) -> Self { Self }
229+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
230+
231+ error: type `OtherType` from private dependency 'priv_dep' in public interface
232+ --> $DIR/pub-priv1.rs:143:1
233+ |
234+ LL | impl From<PublicWithStdImpl> for OtherType {
235+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
236+
237+ error: type `OtherType` from private dependency 'priv_dep' in public interface
238+ --> $DIR/pub-priv1.rs:143:1
239+ |
240+ LL | impl From<PublicWithStdImpl> for OtherType {
241+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
242+ |
243+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
244+
245+ error: type `OtherType` from private dependency 'priv_dep' in public interface
246+ --> $DIR/pub-priv1.rs:146:5
247+ |
248+ LL | fn from(val: PublicWithStdImpl) -> Self { Self }
249+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
250+
251+ error: type `OtherType` from private dependency 'priv_dep' in public interface
252+ --> $DIR/pub-priv1.rs:146:5
253+ |
254+ LL | fn from(val: PublicWithStdImpl) -> Self { Self }
255+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
256+ |
257+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
258+
259+ error: aborting due to 41 previous errors
130260
0 commit comments