1 error: private type `types::Priv` in public interface (error E0446)
2 --> $DIR/private-in-public-warn.rs:25:5
4 LL | pub type Alias = Priv; //~ ERROR private type `types::Priv` in public interface
5 | ^^^^^^^^^^^^^^^^^^^^^^
7 note: lint level defined here
8 --> $DIR/private-in-public-warn.rs:15: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:28:12
18 LL | V1(Priv), //~ ERROR private type `types::Priv` in public interface
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:30:14
27 LL | V2 { field: Priv }, //~ ERROR private type `types::Priv` in public interface
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:34:9
36 LL | const C: Priv = Priv; //~ ERROR private type `types::Priv` in public interface
37 | ^^^^^^^^^^^^^^^^^^^^^
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:36:9
46 | - `types::Priv` declared as private
48 LL | type Alias = Priv; //~ ERROR private type `types::Priv` in public interface
49 | ^^^^^^^^^^^^^^^^^^ can't leak private type
51 error: private type `types::Priv` in public interface (error E0446)
52 --> $DIR/private-in-public-warn.rs:37:9
54 LL | fn f1(arg: Priv) {} //~ ERROR private type `types::Priv` in public interface
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:39:9
63 LL | fn f2() -> Priv { panic!() } //~ ERROR private type `types::Priv` in public interface
64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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:43:9
72 LL | pub static ES: Priv; //~ ERROR private type `types::Priv` in public interface
73 | ^^^^^^^^^^^^^^^^^^^^
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:45:9
81 LL | pub fn ef1(arg: Priv); //~ ERROR private type `types::Priv` in public interface
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:47:9
90 LL | pub fn ef2() -> Priv; //~ ERROR private type `types::Priv` in public interface
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:51:9
100 | - `types::Priv` declared as private
102 LL | type Alias = Priv; //~ ERROR private type `types::Priv` in public interface
103 | ^^^^^^^^^^^^^^^^^^ can't leak private type
105 error: private trait `traits::PrivTr` in public interface (error E0445)
106 --> $DIR/private-in-public-warn.rs:60:5
108 LL | pub type Alias<T: PrivTr> = T; //~ ERROR private trait `traits::PrivTr` in public interface
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:62:5
117 LL | pub trait Tr1: PrivTr {} //~ ERROR private trait `traits::PrivTr` in public interface
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:64:5
126 LL | pub trait Tr2<T: PrivTr> {} //~ ERROR private trait `traits::PrivTr` in public interface
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:66:5
135 LL | / pub trait Tr3 {
136 LL | | //~^ ERROR private trait `traits::PrivTr` in public interface
137 LL | | //~| WARNING hard error
138 LL | | type Alias: PrivTr;
139 LL | | fn f<T: PrivTr>(arg: T) {} //~ ERROR private trait `traits::PrivTr` in public interface
140 LL | | //~^ WARNING hard error
144 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
145 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
147 error: private trait `traits::PrivTr` in public interface (error E0445)
148 --> $DIR/private-in-public-warn.rs:70:9
150 LL | fn f<T: PrivTr>(arg: T) {} //~ ERROR private trait `traits::PrivTr` in public interface
151 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
153 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
154 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
156 error: private trait `traits::PrivTr` in public interface (error E0445)
157 --> $DIR/private-in-public-warn.rs:73:5
159 LL | impl<T: PrivTr> Pub<T> {} //~ ERROR private trait `traits::PrivTr` in public interface
160 | ^^^^^^^^^^^^^^^^^^^^^^^^^
162 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
163 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
165 error: private trait `traits::PrivTr` in public interface (error E0445)
166 --> $DIR/private-in-public-warn.rs:75:5
168 LL | impl<T: PrivTr> PubTr for Pub<T> {} //~ ERROR private trait `traits::PrivTr` in public interface
169 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
171 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
172 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
174 error: private trait `traits_where::PrivTr` in public interface (error E0445)
175 --> $DIR/private-in-public-warn.rs:84:5
177 LL | pub type Alias<T> where T: PrivTr = T;
178 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
180 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
181 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
183 error: private trait `traits_where::PrivTr` in public interface (error E0445)
184 --> $DIR/private-in-public-warn.rs:87:5
186 LL | pub trait Tr2<T> where T: PrivTr {}
187 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
189 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
190 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
192 error: private trait `traits_where::PrivTr` in public interface (error E0445)
193 --> $DIR/private-in-public-warn.rs:91:9
195 LL | fn f<T>(arg: T) where T: PrivTr {}
196 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
198 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
199 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
201 error: private trait `traits_where::PrivTr` in public interface (error E0445)
202 --> $DIR/private-in-public-warn.rs:95:5
204 LL | impl<T> Pub<T> where T: PrivTr {}
205 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
207 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
208 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
210 error: private trait `traits_where::PrivTr` in public interface (error E0445)
211 --> $DIR/private-in-public-warn.rs:98:5
213 LL | impl<T> PubTr for Pub<T> where T: PrivTr {}
214 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
216 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
217 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
219 error: private trait `generics::PrivTr<generics::Pub>` in public interface (error E0445)
220 --> $DIR/private-in-public-warn.rs:109:5
222 LL | pub trait Tr1: PrivTr<Pub> {}
223 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
225 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
226 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
228 error: private type `generics::Priv` in public interface (error E0446)
229 --> $DIR/private-in-public-warn.rs:112:5
231 LL | pub trait Tr2: PubTr<Priv> {} //~ ERROR private type `generics::Priv` in public interface
232 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
234 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
235 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
237 error: private type `generics::Priv` in public interface (error E0446)
238 --> $DIR/private-in-public-warn.rs:114:5
240 LL | pub trait Tr3: PubTr<[Priv; 1]> {} //~ ERROR private type `generics::Priv` in public interface
241 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
243 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
244 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
246 error: private type `generics::Priv` in public interface (error E0446)
247 --> $DIR/private-in-public-warn.rs:116:5
249 LL | pub trait Tr4: PubTr<Pub<Priv>> {} //~ ERROR private type `generics::Priv` in public interface
250 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
252 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
253 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
255 error[E0446]: private type `impls::Priv` in public interface
256 --> $DIR/private-in-public-warn.rs:143:9
259 | - `impls::Priv` declared as private
261 LL | type Alias = Priv; //~ ERROR private type `impls::Priv` in public interface
262 | ^^^^^^^^^^^^^^^^^^ can't leak private type
264 error: private type `aliases_pub::Priv` in public interface (error E0446)
265 --> $DIR/private-in-public-warn.rs:214:9
267 LL | pub fn f(arg: Priv) {} //~ ERROR private type `aliases_pub::Priv` in public interface
268 | ^^^^^^^^^^^^^^^^^^^^^^
270 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
271 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
273 error[E0446]: private type `aliases_pub::Priv` in public interface
274 --> $DIR/private-in-public-warn.rs:218:9
277 | - `aliases_pub::Priv` declared as private
279 LL | type Check = Priv; //~ ERROR private type `aliases_pub::Priv` in public interface
280 | ^^^^^^^^^^^^^^^^^^ can't leak private type
282 error[E0446]: private type `aliases_pub::Priv` in public interface
283 --> $DIR/private-in-public-warn.rs:221:9
286 | - `aliases_pub::Priv` declared as private
288 LL | type Check = Priv; //~ ERROR private type `aliases_pub::Priv` in public interface
289 | ^^^^^^^^^^^^^^^^^^ can't leak private type
291 error[E0446]: private type `aliases_pub::Priv` in public interface
292 --> $DIR/private-in-public-warn.rs:224:9
295 | - `aliases_pub::Priv` declared as private
297 LL | type Check = Priv; //~ ERROR private type `aliases_pub::Priv` in public interface
298 | ^^^^^^^^^^^^^^^^^^ can't leak private type
300 error: private trait `aliases_priv::PrivTr1` in public interface (error E0445)
301 --> $DIR/private-in-public-warn.rs:248:5
303 LL | pub trait Tr1: PrivUseAliasTr {}
304 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
306 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
307 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
309 error: private type `aliases_priv::Priv2` in public interface (error E0446)
310 --> $DIR/private-in-public-warn.rs:251:5
312 LL | pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
313 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
315 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
316 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
318 error: private trait `aliases_priv::PrivTr1<aliases_priv::Priv2>` in public interface (error E0445)
319 --> $DIR/private-in-public-warn.rs:251:5
321 LL | pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
322 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
324 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
325 = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
327 error: aborting due to 35 previous errors
329 For more information about this error, try `rustc --explain E0446`.