1- error: type `OtherType ` from private dependency 'priv_dep' in public interface
2- --> $DIR/pub-priv1.rs:29:5
1+ error: extern crate `priv_dep ` from private dependency 'priv_dep' in public interface
2+ --> $DIR/pub-priv1.rs:13:1
33 |
4- LL | pub field: OtherType,
5- | ^^^^^^^^^^^^^^^^^^^^
4+ LL | pub extern crate priv_dep;
5+ | ^^^^^ ^^^^^^^^^^^^^^^^^^^^
66 |
77note: the lint level is defined here
88 --> $DIR/pub-priv1.rs:9:9
@@ -11,64 +11,126 @@ LL | #![deny(exported_private_dependencies)]
1111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
1313error: type `OtherType` from private dependency 'priv_dep' in public interface
14- --> $DIR/pub-priv1.rs:36:5
14+ --> $DIR/pub-priv1.rs:30:5
15+ |
16+ LL | pub field: OtherType,
17+ | ^^^^^^^^^^^^^^^^^^^^
18+
19+ error: type `OtherType` from private dependency 'priv_dep' in public interface
20+ --> $DIR/pub-priv1.rs:37:5
1521 |
1622LL | pub fn pub_fn_param(param: OtherType) {}
1723 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1824
1925error: type `OtherType` from private dependency 'priv_dep' in public interface
20- --> $DIR/pub-priv1.rs:39 :5
26+ --> $DIR/pub-priv1.rs:40 :5
2127 |
2228LL | pub fn pub_fn_return() -> OtherType { OtherType }
2329 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2430
2531error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
26- --> $DIR/pub-priv1.rs:46 :5
32+ --> $DIR/pub-priv1.rs:47 :5
2733 |
2834LL | type Foo: OtherTrait;
2935 | ^^^^^^^^^^^^^^^^^^^^
3036
3137error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
32- --> $DIR/pub-priv1.rs:50 :1
38+ --> $DIR/pub-priv1.rs:51 :1
3339 |
3440LL | pub trait WithSuperTrait: OtherTrait {}
3541 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3642
3743error: type `OtherType` from private dependency 'priv_dep' in public interface
38- --> $DIR/pub-priv1.rs:59 :5
44+ --> $DIR/pub-priv1.rs:60 :5
3945 |
4046LL | type X = OtherType;
4147 | ^^^^^^
4248
4349error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
44- --> $DIR/pub-priv1.rs:63 :1
50+ --> $DIR/pub-priv1.rs:64 :1
4551 |
4652LL | pub fn in_bounds<T: OtherTrait>(x: T) { unimplemented!() }
4753 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4854
4955error: type `OtherType` from private dependency 'priv_dep' in public interface
50- --> $DIR/pub-priv1.rs:66 :1
56+ --> $DIR/pub-priv1.rs:67 :1
5157 |
5258LL | pub fn private_in_generic() -> std::num::Saturating<OtherType> { unimplemented!() }
5359 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5460
5561error: type `OtherType` from private dependency 'priv_dep' in public interface
56- --> $DIR/pub-priv1.rs:69 :1
62+ --> $DIR/pub-priv1.rs:70 :1
5763 |
5864LL | pub static STATIC: OtherType = OtherType;
5965 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6066
6167error: type `OtherType` from private dependency 'priv_dep' in public interface
62- --> $DIR/pub-priv1.rs:72 :1
68+ --> $DIR/pub-priv1.rs:73 :1
6369 |
6470LL | pub const CONST: OtherType = OtherType;
6571 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
6672
6773error: type `OtherType` from private dependency 'priv_dep' in public interface
68- --> $DIR/pub-priv1.rs:75 :1
74+ --> $DIR/pub-priv1.rs:76 :1
6975 |
7076LL | pub type Alias = OtherType;
7177 | ^^^^^^^^^^^^^^
7278
73- error: aborting due to 11 previous errors
79+ error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
80+ --> $DIR/pub-priv1.rs:81:1
81+ |
82+ LL | impl OtherTrait for PublicWithPrivateImpl {}
83+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84+
85+ error: type `OtherType` from private dependency 'priv_dep' in public interface
86+ --> $DIR/pub-priv1.rs:86:1
87+ |
88+ LL | impl PubTraitOnPrivate for OtherType {}
89+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90+
91+ error: `use` import `m` from private dependency 'priv_dep' in public interface
92+ --> $DIR/pub-priv1.rs:94:9
93+ |
94+ LL | pub use priv_dep::m;
95+ | ^^^^^^^^^^^
96+
97+ error: `use` import `fn_like` from private dependency 'pm' in public interface
98+ --> $DIR/pub-priv1.rs:96:9
99+ |
100+ LL | pub use pm::fn_like;
101+ | ^^^^^^^^^^^
102+
103+ error: `use` import `PmDerive` from private dependency 'pm' in public interface
104+ --> $DIR/pub-priv1.rs:98:9
105+ |
106+ LL | pub use pm::PmDerive;
107+ | ^^^^^^^^^^^^
108+
109+ error: `use` import `pm_attr` from private dependency 'pm' in public interface
110+ --> $DIR/pub-priv1.rs:100:9
111+ |
112+ LL | pub use pm::pm_attr;
113+ | ^^^^^^^^^^^
114+
115+ error: `use` import `V1` from private dependency 'priv_dep' in public interface
116+ --> $DIR/pub-priv1.rs:102:9
117+ |
118+ LL | pub use priv_dep::E::V1;
119+ | ^^^^^^^^^^^^^^^
120+
121+ error: `use` import `V1` from private dependency 'priv_dep' in public interface
122+ --> $DIR/pub-priv1.rs:102:9
123+ |
124+ LL | pub use priv_dep::E::V1;
125+ | ^^^^^^^^^^^^^^^
126+ |
127+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
128+
129+ error: `use` import `priv_dep` from private dependency 'priv_dep' in public interface
130+ --> $DIR/pub-priv1.rs:105:9
131+ |
132+ LL | pub use priv_dep::*;
133+ | ^^^^^^^^
134+
135+ error: aborting due to 21 previous errors
74136
0 commit comments