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 LL | | pub fn f<U: PrivTr>(arg: U) {}
118 | |_____^ can't leak private trait
120 error[E0445]: private trait `traits::PrivTr` in public interface
121 --> $DIR/private-in-public.rs:35:9
124 | - `traits::PrivTr` declared as private
126 LL | pub fn f<U: PrivTr>(arg: U) {}
127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
129 error[E0445]: private trait `traits_where::PrivTr` in public interface
130 --> $DIR/private-in-public.rs:44:5
133 | - `traits_where::PrivTr` declared as private
135 LL | pub enum E<T> where T: PrivTr { V(T) }
136 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
138 error[E0445]: private trait `traits_where::PrivTr` in public interface
139 --> $DIR/private-in-public.rs:46:5
142 | - `traits_where::PrivTr` declared as private
144 LL | pub fn f<T>(arg: T) where T: PrivTr {}
145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
147 error[E0445]: private trait `traits_where::PrivTr` in public interface
148 --> $DIR/private-in-public.rs:48:5
151 | - `traits_where::PrivTr` declared as private
153 LL | pub struct S1<T>(T) where T: PrivTr;
154 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
156 error[E0445]: private trait `traits_where::PrivTr` in public interface
157 --> $DIR/private-in-public.rs:50:5
160 | - `traits_where::PrivTr` declared as private
162 LL | / impl<T> Pub<T> where T: PrivTr {
164 LL | | pub fn f<U>(arg: U) where U: PrivTr {}
167 | |_____^ can't leak private trait
169 error[E0445]: private trait `traits_where::PrivTr` in public interface
170 --> $DIR/private-in-public.rs:52:9
173 | - `traits_where::PrivTr` declared as private
175 LL | pub fn f<U>(arg: U) where U: PrivTr {}
176 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
178 error[E0446]: private type `generics::Priv` in public interface
179 --> $DIR/private-in-public.rs:63:5
181 LL | struct Priv<T = u8>(T);
182 | - `generics::Priv` declared as private
184 LL | pub fn f1(arg: [Priv; 1]) {}
185 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
187 error[E0446]: private type `generics::Priv` in public interface
188 --> $DIR/private-in-public.rs:64:5
190 LL | struct Priv<T = u8>(T);
191 | - `generics::Priv` declared as private
193 LL | pub fn f2(arg: Pub<Priv>) {}
194 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
196 error[E0446]: private type `generics::Priv<generics::Pub>` in public interface
197 --> $DIR/private-in-public.rs:65:5
199 LL | struct Priv<T = u8>(T);
200 | - `generics::Priv<generics::Pub>` declared as private
202 LL | pub fn f3(arg: Priv<Pub>) {}
203 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
205 error[E0446]: private type `impls::Priv` in public interface
206 --> $DIR/private-in-public.rs:80:9
209 | - `impls::Priv` declared as private
211 LL | pub fn f(arg: Priv) {}
212 | ^^^^^^^^^^^^^^^^^^^ can't leak private type
214 error[E0445]: private trait `aliases_pub::PrivTr` in public interface
215 --> $DIR/private-in-public.rs:104:5
218 | - `aliases_pub::PrivTr` declared as private
220 LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
221 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
223 error[E0446]: private type `aliases_pub::Priv` in public interface
224 --> $DIR/private-in-public.rs:104:5
227 | - `aliases_pub::Priv` declared as private
229 LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
230 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
232 error[E0446]: private type `aliases_pub::Priv` in public interface
233 --> $DIR/private-in-public.rs:109:9
236 | - `aliases_pub::Priv` declared as private
238 LL | pub fn f(arg: Priv) {}
239 | ^^^^^^^^^^^^^^^^^^^ can't leak private type
241 error[E0446]: private type `Priv1` in public interface
242 --> $DIR/private-in-public.rs:131:5
245 | - `Priv1` declared as private
247 LL | pub fn f1(arg: PrivUseAlias) {}
248 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
250 error[E0446]: private type `Priv2` in public interface
251 --> $DIR/private-in-public.rs:132:5
254 | - `Priv2` declared as private
256 LL | pub fn f2(arg: PrivAlias) {}
257 | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
259 error[E0445]: private trait `aliases_priv::PrivTr` in public interface
260 --> $DIR/private-in-public.rs:133:5
263 | - `aliases_priv::PrivTr` declared as private
265 LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
266 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
268 error[E0446]: private type `aliases_priv::Priv` in public interface
269 --> $DIR/private-in-public.rs:133:5
272 | - `aliases_priv::Priv` declared as private
274 LL | pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
275 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
277 error[E0446]: private type `aliases_params::Priv` in public interface
278 --> $DIR/private-in-public.rs:143:5
281 | - `aliases_params::Priv` declared as private
283 LL | pub fn f2(arg: PrivAliasGeneric) {}
284 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
286 error[E0446]: private type `aliases_params::Priv` in public interface
287 --> $DIR/private-in-public.rs:145:5
290 | - `aliases_params::Priv` declared as private
292 LL | pub fn f3(arg: Result<u8>) {}
293 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
295 error: aborting due to 32 previous errors
297 Some errors have detailed explanations: E0445, E0446.
298 For more information about an error, try `rustc --explain E0445`.