1 error: private type `types::Priv` in public interface (error E0446)
2 --> $DIR/private-in-public-warn.rs:15:5
4 LL | pub type Alias = Priv;
7 note: the lint level is defined here
8 --> $DIR/private-in-public-warn.rs:5:9
10 LL | #![deny(private_in_public)]
12 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
13 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
15 error: private type `types::Priv` in public interface (error E0446)
16 --> $DIR/private-in-public-warn.rs:18:12
21 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
22 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
24 error: private type `types::Priv` in public interface (error E0446)
25 --> $DIR/private-in-public-warn.rs:20:14
27 LL | V2 { field: Priv },
30 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
31 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
33 error: private type `types::Priv` in public interface (error E0446)
34 --> $DIR/private-in-public-warn.rs:24:9
36 LL | const C: Priv = Priv;
39 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
40 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
42 error[E0446]: private type `types::Priv` in public interface
43 --> $DIR/private-in-public-warn.rs:26:9
46 | ----------- `types::Priv` declared as private
48 LL | type Alias = Priv;
49 | ^^^^^^^^^^ can't leak private type
51 error: private type `types::Priv` in public interface (error E0446)
52 --> $DIR/private-in-public-warn.rs:27:9
54 LL | fn f1(arg: Priv) {}
57 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
58 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
60 error: private type `types::Priv` in public interface (error E0446)
61 --> $DIR/private-in-public-warn.rs:29:9
63 LL | fn f2() -> Priv { panic!() }
66 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
67 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
69 error: private type `types::Priv` in public interface (error E0446)
70 --> $DIR/private-in-public-warn.rs:33:9
72 LL | pub static ES: Priv;
75 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
76 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
78 error: private type `types::Priv` in public interface (error E0446)
79 --> $DIR/private-in-public-warn.rs:35:9
81 LL | pub fn ef1(arg: Priv);
82 | ^^^^^^^^^^^^^^^^^^^^^
84 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
85 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
87 error: private type `types::Priv` in public interface (error E0446)
88 --> $DIR/private-in-public-warn.rs:37:9
90 LL | pub fn ef2() -> Priv;
91 | ^^^^^^^^^^^^^^^^^^^^
93 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
94 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
96 error[E0446]: private type `types::Priv` in public interface
97 --> $DIR/private-in-public-warn.rs:41:9
100 | ----------- `types::Priv` declared as private
102 LL | type Alias = Priv;
103 | ^^^^^^^^^^ can't leak private type
105 error: private trait `traits::PrivTr` in public interface (error E0445)
106 --> $DIR/private-in-public-warn.rs:50:5
108 LL | pub type Alias<T: PrivTr> = T;
109 | ^^^^^^^^^^^^^^^^^^^^^^^^^
111 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
112 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
114 error: private trait `traits::PrivTr` in public interface (error E0445)
115 --> $DIR/private-in-public-warn.rs:53:5
117 LL | pub trait Tr1: PrivTr {}
118 | ^^^^^^^^^^^^^^^^^^^^^
120 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
121 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
123 error: private trait `traits::PrivTr` in public interface (error E0445)
124 --> $DIR/private-in-public-warn.rs:55:5
126 LL | pub trait Tr2<T: PrivTr> {}
127 | ^^^^^^^^^^^^^^^^^^^^^^^^
129 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
130 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
132 error: private trait `traits::PrivTr` in public interface (error E0445)
133 --> $DIR/private-in-public-warn.rs:58:9
135 LL | type Alias: PrivTr;
138 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
139 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
141 error: private trait `traits::PrivTr` in public interface (error E0445)
142 --> $DIR/private-in-public-warn.rs:61:9
144 LL | fn f<T: PrivTr>(arg: T) {}
145 | ^^^^^^^^^^^^^^^^^^^^^^^
147 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
148 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
150 error: private trait `traits::PrivTr` in public interface (error E0445)
151 --> $DIR/private-in-public-warn.rs:64:5
153 LL | impl<T: PrivTr> Pub<T> {}
154 | ^^^^^^^^^^^^^^^^^^^^^^
156 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
157 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
159 error: private trait `traits_where::PrivTr` in public interface (error E0445)
160 --> $DIR/private-in-public-warn.rs:74:5
162 LL | pub type Alias<T> where T: PrivTr = T;
165 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
166 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
168 error: private trait `traits_where::PrivTr` in public interface (error E0445)
169 --> $DIR/private-in-public-warn.rs:78:5
171 LL | pub trait Tr2<T> where T: PrivTr {}
174 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
175 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
177 error: private trait `traits_where::PrivTr` in public interface (error E0445)
178 --> $DIR/private-in-public-warn.rs:82:9
180 LL | fn f<T>(arg: T) where T: PrivTr {}
181 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
184 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
186 error: private trait `traits_where::PrivTr` in public interface (error E0445)
187 --> $DIR/private-in-public-warn.rs:86:5
189 LL | impl<T> Pub<T> where T: PrivTr {}
192 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
193 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
195 error: private trait `generics::PrivTr<generics::Pub>` in public interface (error E0445)
196 --> $DIR/private-in-public-warn.rs:98:5
198 LL | pub trait Tr1: PrivTr<Pub> {}
199 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
201 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
202 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
204 error: private type `generics::Priv` in public interface (error E0446)
205 --> $DIR/private-in-public-warn.rs:101:5
207 LL | pub trait Tr2: PubTr<Priv> {}
208 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
210 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
211 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
213 error: private type `generics::Priv` in public interface (error E0446)
214 --> $DIR/private-in-public-warn.rs:103:5
216 LL | pub trait Tr3: PubTr<[Priv; 1]> {}
217 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
219 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
220 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
222 error: private type `generics::Priv` in public interface (error E0446)
223 --> $DIR/private-in-public-warn.rs:105:5
225 LL | pub trait Tr4: PubTr<Pub<Priv>> {}
226 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
228 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
229 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
231 error[E0446]: private type `impls::Priv` in public interface
232 --> $DIR/private-in-public-warn.rs:132:9
235 | ----------- `impls::Priv` declared as private
237 LL | type Alias = Priv;
238 | ^^^^^^^^^^ can't leak private type
240 error: private type `aliases_pub::Priv` in public interface (error E0446)
241 --> $DIR/private-in-public-warn.rs:203:9
243 LL | pub fn f(arg: Priv) {}
244 | ^^^^^^^^^^^^^^^^^^^
246 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
247 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
249 error[E0446]: private type `aliases_pub::Priv` in public interface
250 --> $DIR/private-in-public-warn.rs:207:9
253 | ----------- `aliases_pub::Priv` declared as private
255 LL | type Check = Priv;
256 | ^^^^^^^^^^ can't leak private type
258 error[E0446]: private type `aliases_pub::Priv` in public interface
259 --> $DIR/private-in-public-warn.rs:210:9
262 | ----------- `aliases_pub::Priv` declared as private
264 LL | type Check = Priv;
265 | ^^^^^^^^^^ can't leak private type
267 error[E0446]: private type `aliases_pub::Priv` in public interface
268 --> $DIR/private-in-public-warn.rs:213:9
271 | ----------- `aliases_pub::Priv` declared as private
273 LL | type Check = Priv;
274 | ^^^^^^^^^^ can't leak private type
276 error[E0446]: private type `aliases_pub::Priv` in public interface
277 --> $DIR/private-in-public-warn.rs:216:9
280 | ----------- `aliases_pub::Priv` declared as private
282 LL | type Check = Priv;
283 | ^^^^^^^^^^ can't leak private type
285 error: private trait `PrivTr1` in public interface (error E0445)
286 --> $DIR/private-in-public-warn.rs:246:5
288 LL | pub trait Tr1: PrivUseAliasTr {}
289 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
291 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
292 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
294 error: private trait `PrivTr1<Priv2>` in public interface (error E0445)
295 --> $DIR/private-in-public-warn.rs:249:5
297 LL | pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
298 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
300 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
301 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
303 error: private type `Priv2` in public interface (error E0446)
304 --> $DIR/private-in-public-warn.rs:249:5
306 LL | pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
307 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
309 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
310 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
312 warning: bounds on generic parameters are not enforced in type aliases
313 --> $DIR/private-in-public-warn.rs:50:23
315 LL | pub type Alias<T: PrivTr> = T;
318 = note: `#[warn(type_alias_bounds)]` on by default
319 help: the bound will not be checked when the type alias is used, and should be removed
321 LL - pub type Alias<T: PrivTr> = T;
322 LL + pub type Alias<T> = T;
325 warning: where clauses are not enforced in type aliases
326 --> $DIR/private-in-public-warn.rs:74:29
328 LL | pub type Alias<T> where T: PrivTr = T;
331 help: the clause will not be checked when the type alias is used, and should be removed
333 LL - pub type Alias<T> where T: PrivTr = T;
334 LL + pub type Alias<T> = T;
337 error: aborting due to 34 previous errors; 2 warnings emitted
339 For more information about this error, try `rustc --explain E0446`.