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
3
3
|
4
- LL | pub field: OtherType,
5
- | ^^^^^^^^^^^^^^^^^^^^
4
+ LL | pub extern crate priv_dep;
5
+ | ^^^^^ ^^^^^^^^^^^^^^^^^^^^
6
6
|
7
7
note: the lint level is defined here
8
8
--> $DIR/pub-priv1.rs:9:9
@@ -11,64 +11,126 @@ LL | #![deny(exported_private_dependencies)]
11
11
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
12
13
13
error: 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
15
21
|
16
22
LL | pub fn pub_fn_param(param: OtherType) {}
17
23
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
24
19
25
error: type `OtherType` from private dependency 'priv_dep' in public interface
20
- --> $DIR/pub-priv1.rs:39 :5
26
+ --> $DIR/pub-priv1.rs:40 :5
21
27
|
22
28
LL | pub fn pub_fn_return() -> OtherType { OtherType }
23
29
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24
30
25
31
error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
26
- --> $DIR/pub-priv1.rs:46 :5
32
+ --> $DIR/pub-priv1.rs:47 :5
27
33
|
28
34
LL | type Foo: OtherTrait;
29
35
| ^^^^^^^^^^^^^^^^^^^^
30
36
31
37
error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
32
- --> $DIR/pub-priv1.rs:50 :1
38
+ --> $DIR/pub-priv1.rs:51 :1
33
39
|
34
40
LL | pub trait WithSuperTrait: OtherTrait {}
35
41
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36
42
37
43
error: type `OtherType` from private dependency 'priv_dep' in public interface
38
- --> $DIR/pub-priv1.rs:59 :5
44
+ --> $DIR/pub-priv1.rs:60 :5
39
45
|
40
46
LL | type X = OtherType;
41
47
| ^^^^^^
42
48
43
49
error: trait `OtherTrait` from private dependency 'priv_dep' in public interface
44
- --> $DIR/pub-priv1.rs:63 :1
50
+ --> $DIR/pub-priv1.rs:64 :1
45
51
|
46
52
LL | pub fn in_bounds<T: OtherTrait>(x: T) { unimplemented!() }
47
53
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
54
49
55
error: type `OtherType` from private dependency 'priv_dep' in public interface
50
- --> $DIR/pub-priv1.rs:66 :1
56
+ --> $DIR/pub-priv1.rs:67 :1
51
57
|
52
58
LL | pub fn private_in_generic() -> std::num::Saturating<OtherType> { unimplemented!() }
53
59
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54
60
55
61
error: type `OtherType` from private dependency 'priv_dep' in public interface
56
- --> $DIR/pub-priv1.rs:69 :1
62
+ --> $DIR/pub-priv1.rs:70 :1
57
63
|
58
64
LL | pub static STATIC: OtherType = OtherType;
59
65
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60
66
61
67
error: type `OtherType` from private dependency 'priv_dep' in public interface
62
- --> $DIR/pub-priv1.rs:72 :1
68
+ --> $DIR/pub-priv1.rs:73 :1
63
69
|
64
70
LL | pub const CONST: OtherType = OtherType;
65
71
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
66
72
67
73
error: type `OtherType` from private dependency 'priv_dep' in public interface
68
- --> $DIR/pub-priv1.rs:75 :1
74
+ --> $DIR/pub-priv1.rs:76 :1
69
75
|
70
76
LL | pub type Alias = OtherType;
71
77
| ^^^^^^^^^^^^^^
72
78
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
74
136
0 commit comments