]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0666]: nested `impl Trait` is not allowed |
60c5eb7d | 2 | --> $DIR/where-allowed.rs:47:51 |
b7449926 XL |
3 | | |
4 | LL | fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() } | |
5 | | --------^^^^^^^^^^- | |
6 | | | | | |
7 | | | nested `impl Trait` here | |
8 | | outer `impl Trait` | |
9 | ||
10 | error[E0666]: nested `impl Trait` is not allowed | |
60c5eb7d | 11 | --> $DIR/where-allowed.rs:56:57 |
b7449926 XL |
12 | | |
13 | LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() } | |
14 | | --------^^^^^^^^^^- | |
15 | | | | | |
16 | | | nested `impl Trait` here | |
17 | | outer `impl Trait` | |
18 | ||
416331ca | 19 | error[E0658]: `impl Trait` in type aliases is unstable |
1b1a35ee | 20 | --> $DIR/where-allowed.rs:121:16 |
416331ca XL |
21 | | |
22 | LL | type Out = impl Debug; | |
60c5eb7d | 23 | | ^^^^^^^^^^ |
416331ca | 24 | | |
74b04a01 | 25 | = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information |
416331ca XL |
26 | = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable |
27 | ||
28 | error[E0658]: `impl Trait` in type aliases is unstable | |
1b1a35ee | 29 | --> $DIR/where-allowed.rs:157:23 |
416331ca XL |
30 | | |
31 | LL | type InTypeAlias<R> = impl Debug; | |
60c5eb7d XL |
32 | | ^^^^^^^^^^ |
33 | | | |
74b04a01 | 34 | = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information |
60c5eb7d XL |
35 | = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable |
36 | ||
37 | error[E0658]: `impl Trait` in type aliases is unstable | |
1b1a35ee | 38 | --> $DIR/where-allowed.rs:161:39 |
60c5eb7d XL |
39 | | |
40 | LL | type InReturnInTypeAlias<R> = fn() -> impl Debug; | |
41 | | ^^^^^^^^^^ | |
416331ca | 42 | | |
74b04a01 | 43 | = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information |
416331ca XL |
44 | = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable |
45 | ||
b7449926 | 46 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types |
60c5eb7d | 47 | --> $DIR/where-allowed.rs:15:40 |
b7449926 XL |
48 | | |
49 | LL | fn in_fn_parameter_in_parameters(_: fn(impl Debug)) { panic!() } | |
50 | | ^^^^^^^^^^ | |
51 | ||
52 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
60c5eb7d | 53 | --> $DIR/where-allowed.rs:19:42 |
b7449926 XL |
54 | | |
55 | LL | fn in_fn_return_in_parameters(_: fn() -> impl Debug) { panic!() } | |
56 | | ^^^^^^^^^^ | |
57 | ||
58 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
60c5eb7d | 59 | --> $DIR/where-allowed.rs:23:38 |
b7449926 XL |
60 | | |
61 | LL | fn in_fn_parameter_in_return() -> fn(impl Debug) { panic!() } | |
62 | | ^^^^^^^^^^ | |
63 | ||
64 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
60c5eb7d | 65 | --> $DIR/where-allowed.rs:27:40 |
b7449926 XL |
66 | | |
67 | LL | fn in_fn_return_in_return() -> fn() -> impl Debug { panic!() } | |
68 | | ^^^^^^^^^^ | |
69 | ||
70 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
60c5eb7d | 71 | --> $DIR/where-allowed.rs:31:49 |
b7449926 XL |
72 | | |
73 | LL | fn in_dyn_Fn_parameter_in_parameters(_: &dyn Fn(impl Debug)) { panic!() } | |
74 | | ^^^^^^^^^^ | |
75 | ||
76 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
60c5eb7d | 77 | --> $DIR/where-allowed.rs:35:51 |
b7449926 XL |
78 | | |
79 | LL | fn in_dyn_Fn_return_in_parameters(_: &dyn Fn() -> impl Debug) { panic!() } | |
80 | | ^^^^^^^^^^ | |
81 | ||
82 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
60c5eb7d | 83 | --> $DIR/where-allowed.rs:39:55 |
b7449926 XL |
84 | | |
85 | LL | fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() } | |
86 | | ^^^^^^^^^^ | |
87 | ||
88 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
60c5eb7d | 89 | --> $DIR/where-allowed.rs:43:57 |
b7449926 XL |
90 | | |
91 | LL | fn in_dyn_Fn_return_in_return() -> &'static dyn Fn() -> impl Debug { panic!() } | |
92 | | ^^^^^^^^^^ | |
93 | ||
94 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
60c5eb7d | 95 | --> $DIR/where-allowed.rs:47:51 |
b7449926 XL |
96 | | |
97 | LL | fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() } | |
98 | | ^^^^^^^^^^ | |
99 | ||
100 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
60c5eb7d | 101 | --> $DIR/where-allowed.rs:52:53 |
b7449926 XL |
102 | | |
103 | LL | fn in_impl_Fn_return_in_parameters(_: &impl Fn() -> impl Debug) { panic!() } | |
104 | | ^^^^^^^^^^ | |
105 | ||
106 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
60c5eb7d | 107 | --> $DIR/where-allowed.rs:56:57 |
b7449926 XL |
108 | | |
109 | LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() } | |
110 | | ^^^^^^^^^^ | |
111 | ||
112 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 113 | --> $DIR/where-allowed.rs:62:59 |
b7449926 XL |
114 | | |
115 | LL | fn in_impl_Fn_return_in_return() -> &'static impl Fn() -> impl Debug { panic!() } | |
116 | | ^^^^^^^^^^ | |
117 | ||
118 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 119 | --> $DIR/where-allowed.rs:67:38 |
b7449926 XL |
120 | | |
121 | LL | fn in_Fn_parameter_in_generics<F: Fn(impl Debug)> (_: F) { panic!() } | |
122 | | ^^^^^^^^^^ | |
123 | ||
124 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 125 | --> $DIR/where-allowed.rs:71:40 |
b7449926 XL |
126 | | |
127 | LL | fn in_Fn_return_in_generics<F: Fn() -> impl Debug> (_: F) { panic!() } | |
128 | | ^^^^^^^^^^ | |
129 | ||
130 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 131 | --> $DIR/where-allowed.rs:84:32 |
b7449926 XL |
132 | | |
133 | LL | struct InBraceStructField { x: impl Debug } | |
134 | | ^^^^^^^^^^ | |
135 | ||
136 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 137 | --> $DIR/where-allowed.rs:88:41 |
b7449926 XL |
138 | | |
139 | LL | struct InAdtInBraceStructField { x: Vec<impl Debug> } | |
140 | | ^^^^^^^^^^ | |
141 | ||
142 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 143 | --> $DIR/where-allowed.rs:92:27 |
b7449926 XL |
144 | | |
145 | LL | struct InTupleStructField(impl Debug); | |
146 | | ^^^^^^^^^^ | |
147 | ||
148 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 149 | --> $DIR/where-allowed.rs:97:25 |
b7449926 XL |
150 | | |
151 | LL | InBraceVariant { x: impl Debug }, | |
152 | | ^^^^^^^^^^ | |
153 | ||
154 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 155 | --> $DIR/where-allowed.rs:99:20 |
b7449926 XL |
156 | | |
157 | LL | InTupleVariant(impl Debug), | |
158 | | ^^^^^^^^^^ | |
159 | ||
160 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 161 | --> $DIR/where-allowed.rs:110:23 |
b7449926 XL |
162 | | |
163 | LL | fn in_return() -> impl Debug; | |
164 | | ^^^^^^^^^^ | |
165 | ||
166 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 167 | --> $DIR/where-allowed.rs:128:34 |
b7449926 XL |
168 | | |
169 | LL | fn in_trait_impl_return() -> impl Debug { () } | |
170 | | ^^^^^^^^^^ | |
171 | ||
172 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 173 | --> $DIR/where-allowed.rs:141:33 |
b7449926 XL |
174 | | |
175 | LL | fn in_foreign_parameters(_: impl Debug); | |
176 | | ^^^^^^^^^^ | |
177 | ||
178 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 179 | --> $DIR/where-allowed.rs:144:31 |
b7449926 XL |
180 | | |
181 | LL | fn in_foreign_return() -> impl Debug; | |
182 | | ^^^^^^^^^^ | |
183 | ||
184 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 185 | --> $DIR/where-allowed.rs:161:39 |
b7449926 XL |
186 | | |
187 | LL | type InReturnInTypeAlias<R> = fn() -> impl Debug; | |
188 | | ^^^^^^^^^^ | |
189 | ||
190 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 191 | --> $DIR/where-allowed.rs:166:16 |
b7449926 XL |
192 | | |
193 | LL | impl PartialEq<impl Debug> for () { | |
194 | | ^^^^^^^^^^ | |
195 | ||
196 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 197 | --> $DIR/where-allowed.rs:171:24 |
b7449926 XL |
198 | | |
199 | LL | impl PartialEq<()> for impl Debug { | |
200 | | ^^^^^^^^^^ | |
201 | ||
202 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 203 | --> $DIR/where-allowed.rs:176:6 |
b7449926 XL |
204 | | |
205 | LL | impl impl Debug { | |
206 | | ^^^^^^^^^^ | |
207 | ||
208 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 209 | --> $DIR/where-allowed.rs:182:24 |
b7449926 XL |
210 | | |
211 | LL | impl InInherentImplAdt<impl Debug> { | |
212 | | ^^^^^^^^^^ | |
213 | ||
214 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 215 | --> $DIR/where-allowed.rs:188:11 |
b7449926 XL |
216 | | |
217 | LL | where impl Debug: Debug | |
218 | | ^^^^^^^^^^ | |
219 | ||
220 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 221 | --> $DIR/where-allowed.rs:195:15 |
b7449926 XL |
222 | | |
223 | LL | where Vec<impl Debug>: Debug | |
224 | | ^^^^^^^^^^ | |
225 | ||
226 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 227 | --> $DIR/where-allowed.rs:202:24 |
b7449926 XL |
228 | | |
229 | LL | where T: PartialEq<impl Debug> | |
230 | | ^^^^^^^^^^ | |
231 | ||
232 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 233 | --> $DIR/where-allowed.rs:209:17 |
b7449926 XL |
234 | | |
235 | LL | where T: Fn(impl Debug) | |
236 | | ^^^^^^^^^^ | |
237 | ||
238 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 239 | --> $DIR/where-allowed.rs:216:22 |
b7449926 XL |
240 | | |
241 | LL | where T: Fn() -> impl Debug | |
242 | | ^^^^^^^^^^ | |
243 | ||
244 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 245 | --> $DIR/where-allowed.rs:222:29 |
b7449926 XL |
246 | | |
247 | LL | let _in_local_variable: impl Fn() = || {}; | |
248 | | ^^^^^^^^^ | |
0bf4aa26 | 249 | | |
416331ca | 250 | = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable |
b7449926 XL |
251 | |
252 | error[E0562]: `impl Trait` not allowed outside of function and inherent method return types | |
1b1a35ee | 253 | --> $DIR/where-allowed.rs:224:46 |
b7449926 XL |
254 | | |
255 | LL | let _in_return_in_local_variable = || -> impl Fn() { || {} }; | |
256 | | ^^^^^^^^^ | |
257 | ||
1b1a35ee XL |
258 | error[E0720]: cannot resolve opaque type |
259 | --> $DIR/where-allowed.rs:56:49 | |
260 | | | |
261 | LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() } | |
262 | | ^^^^^^^^^^^^^^^^^^^ -------- this returned value is of `!` type | |
263 | | | | |
264 | | cannot resolve opaque type | |
265 | | | |
266 | = help: this error will resolve once the item's body returns a concrete type | |
267 | ||
268 | error[E0720]: cannot resolve opaque type | |
269 | --> $DIR/where-allowed.rs:62:46 | |
270 | | | |
271 | LL | fn in_impl_Fn_return_in_return() -> &'static impl Fn() -> impl Debug { panic!() } | |
272 | | ^^^^^^^^^^^^^^^^^^^^^^^ -------- this returned value is of `!` type | |
273 | | | | |
274 | | cannot resolve opaque type | |
275 | | | |
276 | = help: this error will resolve once the item's body returns a concrete type | |
277 | ||
416331ca | 278 | error: could not find defining uses |
1b1a35ee | 279 | --> $DIR/where-allowed.rs:121:16 |
416331ca | 280 | | |
f035d41b XL |
281 | LL | type Out = impl Debug; |
282 | | ^^^^^^^^^^ | |
416331ca XL |
283 | |
284 | error: could not find defining uses | |
1b1a35ee | 285 | --> $DIR/where-allowed.rs:157:23 |
416331ca | 286 | | |
f035d41b XL |
287 | LL | type InTypeAlias<R> = impl Debug; |
288 | | ^^^^^^^^^^ | |
416331ca | 289 | |
1b1a35ee | 290 | error: aborting due to 44 previous errors |
b7449926 | 291 | |
1b1a35ee | 292 | Some errors have detailed explanations: E0562, E0658, E0666, E0720. |
60c5eb7d | 293 | For more information about an error, try `rustc --explain E0562`. |