1 error[E0446]: private type `types::Priv` in public interface
2 --> $DIR/private-in-public.rs:13:5
5 | ----------- `types::Priv` declared as private
7 LL | pub const C: Priv = Priv;
8 | ^^^^^^^^^^^^^^^^^ can't leak private type
10 error[E0446]: private type `types::Priv` in public interface
11 --> $DIR/private-in-public.rs:14:5
14 | ----------- `types::Priv` declared as private
16 LL | pub static S: Priv = Priv;
17 | ^^^^^^^^^^^^^^^^^^ can't leak private type
19 error[E0446]: private type `types::Priv` in public interface
20 --> $DIR/private-in-public.rs:15:5
23 | ----------- `types::Priv` declared as private
25 LL | pub fn f1(arg: Priv) {}
26 | ^^^^^^^^^^^^^^^^^^^^ can't leak private type
28 error[E0446]: private type `types::Priv` in public interface
29 --> $DIR/private-in-public.rs:16:5
32 | ----------- `types::Priv` declared as private
34 LL | pub fn f2() -> Priv { panic!() }
35 | ^^^^^^^^^^^^^^^^^^^ can't leak private type
37 error[E0446]: private type `types::Priv` in public interface
38 --> $DIR/private-in-public.rs:17:19
41 | ----------- `types::Priv` declared as private
43 LL | pub struct S1(pub Priv);
44 | ^^^^^^^^ can't leak private type
46 error[E0446]: private type `types::Priv` in public interface
47 --> $DIR/private-in-public.rs:18:21
50 | ----------- `types::Priv` declared as private
52 LL | pub struct S2 { pub field: Priv }
53 | ^^^^^^^^^^^^^^^ can't leak private type
55 error[E0446]: private type `types::Priv` in public interface
56 --> $DIR/private-in-public.rs:20:9
59 | ----------- `types::Priv` declared as private
61 LL | pub const C: Priv = Priv;
62 | ^^^^^^^^^^^^^^^^^ can't leak private type
64 error[E0446]: private type `types::Priv` in public interface
65 --> $DIR/private-in-public.rs:21:9
68 | ----------- `types::Priv` declared as private
70 LL | pub fn f1(arg: Priv) {}
71 | ^^^^^^^^^^^^^^^^^^^^ can't leak private type
73 error[E0446]: private type `types::Priv` in public interface
74 --> $DIR/private-in-public.rs:22:9
77 | ----------- `types::Priv` declared as private
79 LL | pub fn f2() -> Priv { panic!() }
80 | ^^^^^^^^^^^^^^^^^^^ can't leak private type
82 error[E0445]: private trait `traits::PrivTr` in public interface
83 --> $DIR/private-in-public.rs:31:5
86 | ------------ `traits::PrivTr` declared as private
88 LL | pub enum E<T: PrivTr> { V(T) }
89 | ^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
91 error[E0445]: private trait `traits::PrivTr` in public interface
92 --> $DIR/private-in-public.rs:32:5
95 | ------------ `traits::PrivTr` declared as private
97 LL | pub fn f<T: PrivTr>(arg: T) {}
98 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
100 error[E0445]: private trait `traits::PrivTr` in public interface
101 --> $DIR/private-in-public.rs:33:5
104 | ------------ `traits::PrivTr` declared as private
106 LL | pub struct S1<T: PrivTr>(T);
107 | ^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
109 error[E0445]: private trait `traits::PrivTr` in public interface
110 --> $DIR/private-in-public.rs:34:5
113 | ------------ `traits::PrivTr` declared as private
115 LL | impl<T: PrivTr> Pub<T> {
116 | ^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
118 error[E0445]: private trait `traits::PrivTr` in public interface
119 --> $DIR/private-in-public.rs:35:9
122 | ------------ `traits::PrivTr` declared as private
124 LL | pub fn f<U: PrivTr>(arg: U) {}
125 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
127 error[E0445]: private trait `traits_where::PrivTr` in public interface
128 --> $DIR/private-in-public.rs:44:5
131 | ------------ `traits_where::PrivTr` declared as private
133 LL | pub enum E<T> where T: PrivTr { V(T) }
134 | ^^^^^^^^^^^^^ can't leak private trait
136 error[E0445]: private trait `traits_where::PrivTr` in public interface
137 --> $DIR/private-in-public.rs:46:5
140 | ------------ `traits_where::PrivTr` declared as private
142 LL | pub fn f<T>(arg: T) where T: PrivTr {}
143 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
145 error[E0445]: private trait `traits_where::PrivTr` in public interface
146 --> $DIR/private-in-public.rs:48:5
149 | ------------ `traits_where::PrivTr` declared as private
151 LL | pub struct S1<T>(T) where T: PrivTr;
152 | ^^^^^^^^^^^^^^^^ can't leak private trait
154 error[E0445]: private trait `traits_where::PrivTr` in public interface
155 --> $DIR/private-in-public.rs:50:5
158 | ------------ `traits_where::PrivTr` declared as private
160 LL | impl<T> Pub<T> where T: PrivTr {
161 | ^^^^^^^^^^^^^^ can't leak private trait
163 error[E0445]: private trait `traits_where::PrivTr` in public interface
164 --> $DIR/private-in-public.rs:52:9
167 | ------------ `traits_where::PrivTr` declared as private
169 LL | pub fn f<U>(arg: U) where U: PrivTr {}
170 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
172 error[E0446]: private type `generics::Priv` in public interface
173 --> $DIR/private-in-public.rs:63:5
175 LL | struct Priv<T = u8>(T);
176 | ------------------- `generics::Priv` declared as private
178 LL | pub fn f1(arg: [Priv; 1]) {}
179 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
181 error[E0446]: private type `generics::Priv` in public interface
182 --> $DIR/private-in-public.rs:64:5
184 LL | struct Priv<T = u8>(T);
185 | ------------------- `generics::Priv` declared as private
187 LL | pub fn f2(arg: Pub<Priv>) {}
188 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
190 error[E0446]: private type `generics::Priv<generics::Pub>` in public interface
191 --> $DIR/private-in-public.rs:65:5
193 LL | struct Priv<T = u8>(T);
194 | ------------------- `generics::Priv<generics::Pub>` declared as private
196 LL | pub fn f3(arg: Priv<Pub>) {}
197 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
199 error[E0446]: private type `impls::Priv` in public interface
200 --> $DIR/private-in-public.rs:80:9
203 | ----------- `impls::Priv` declared as private
205 LL | pub fn f(arg: Priv) {}
206 | ^^^^^^^^^^^^^^^^^^^ can't leak private type
208 error[E0445]: private trait `aliases_pub::PrivTr` in public interface
209 --> $DIR/private-in-public.rs:104:5
212 | ------------ `aliases_pub::PrivTr` declared as private
214 LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
215 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
217 error[E0446]: private type `aliases_pub::Priv` in public interface
218 --> $DIR/private-in-public.rs:104:5
221 | ----------- `aliases_pub::Priv` declared as private
223 LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
224 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
226 error[E0446]: private type `aliases_pub::Priv` in public interface
227 --> $DIR/private-in-public.rs:109:9
230 | ----------- `aliases_pub::Priv` declared as private
232 LL | pub fn f(arg: Priv) {}
233 | ^^^^^^^^^^^^^^^^^^^ can't leak private type
235 error[E0446]: private type `Priv1` in public interface
236 --> $DIR/private-in-public.rs:131:5
239 | ------------ `Priv1` declared as private
241 LL | pub fn f1(arg: PrivUseAlias) {}
242 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
244 error[E0446]: private type `Priv2` in public interface
245 --> $DIR/private-in-public.rs:132:5
248 | ------------ `Priv2` declared as private
250 LL | pub fn f2(arg: PrivAlias) {}
251 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
253 error[E0445]: private trait `aliases_priv::PrivTr` in public interface
254 --> $DIR/private-in-public.rs:133:5
257 | ------------ `aliases_priv::PrivTr` declared as private
259 LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
260 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
262 error[E0446]: private type `aliases_priv::Priv` in public interface
263 --> $DIR/private-in-public.rs:133:5
266 | ----------- `aliases_priv::Priv` declared as private
268 LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
269 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
271 error[E0446]: private type `aliases_params::Priv` in public interface
272 --> $DIR/private-in-public.rs:143:5
275 | ----------- `aliases_params::Priv` declared as private
277 LL | pub fn f2(arg: PrivAliasGeneric) {}
278 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
280 error[E0446]: private type `aliases_params::Priv` in public interface
281 --> $DIR/private-in-public.rs:145:5
284 | ----------- `aliases_params::Priv` declared as private
286 LL | pub fn f3(arg: Result<u8>) {}
287 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
289 error: aborting due to 32 previous errors
291 Some errors have detailed explanations: E0445, E0446.
292 For more information about an error, try `rustc --explain E0445`.