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