@@ -54,7 +54,29 @@ LL | fn test6<T>(_: T) { }
54
54
| ^^^ ^
55
55
56
56
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
57
- --> $DIR/typeck_type_placeholder_item.rs:22:13
57
+ --> $DIR/typeck_type_placeholder_item.rs:22:18
58
+ |
59
+ LL | fn test6_b<T>(_: _, _: T) { }
60
+ | ^ not allowed in type signatures
61
+ |
62
+ help: use type parameters instead
63
+ |
64
+ LL | fn test6_b<T, K>(_: K, _: T) { }
65
+ | ^^^ ^
66
+
67
+ error[E0121]: the type placeholder `_` is not allowed within types on item signatures
68
+ --> $DIR/typeck_type_placeholder_item.rs:25:30
69
+ |
70
+ LL | fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
71
+ | ^ not allowed in type signatures
72
+ |
73
+ help: use type parameters instead
74
+ |
75
+ LL | fn test6_c<T, K, L, A, B, C>(_: C, _: (T, K, L, A, B)) { }
76
+ | ^^^ ^
77
+
78
+ error[E0121]: the type placeholder `_` is not allowed within types on item signatures
79
+ --> $DIR/typeck_type_placeholder_item.rs:28:13
58
80
|
59
81
LL | fn test7(x: _) { let _x: usize = x; }
60
82
| ^ not allowed in type signatures
@@ -65,7 +87,7 @@ LL | fn test7<T>(x: T) { let _x: usize = x; }
65
87
| ^^^ ^
66
88
67
89
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
68
- --> $DIR/typeck_type_placeholder_item.rs:25 :22
90
+ --> $DIR/typeck_type_placeholder_item.rs:31 :22
69
91
|
70
92
LL | fn test8(_f: fn() -> _) { }
71
93
| ^ not allowed in type signatures
@@ -76,7 +98,7 @@ LL | fn test8<T>(_f: fn() -> T) { }
76
98
| ^^^ ^
77
99
78
100
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
79
- --> $DIR/typeck_type_placeholder_item.rs:47 :8
101
+ --> $DIR/typeck_type_placeholder_item.rs:53 :8
80
102
|
81
103
LL | a: _,
82
104
| ^ not allowed in type signatures
@@ -95,7 +117,7 @@ LL | b: (T, T),
95
117
|
96
118
97
119
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
98
- --> $DIR/typeck_type_placeholder_item.rs:53 :21
120
+ --> $DIR/typeck_type_placeholder_item.rs:59 :21
99
121
|
100
122
LL | fn fn_test() -> _ { 5 }
101
123
| ^
@@ -104,7 +126,7 @@ LL | fn fn_test() -> _ { 5 }
104
126
| help: replace this with the correct return type: `i32`
105
127
106
128
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
107
- --> $DIR/typeck_type_placeholder_item.rs:56 :22
129
+ --> $DIR/typeck_type_placeholder_item.rs:62 :22
108
130
|
109
131
LL | fn fn_test2() -> (_, _) { (5, 5) }
110
132
| ^^^^^^
@@ -113,7 +135,7 @@ LL | fn fn_test2() -> (_, _) { (5, 5) }
113
135
| help: replace this with the correct return type: `(i32, i32)`
114
136
115
137
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
116
- --> $DIR/typeck_type_placeholder_item.rs:59 :22
138
+ --> $DIR/typeck_type_placeholder_item.rs:65 :22
117
139
|
118
140
LL | static FN_TEST3: _ = "test";
119
141
| ^
@@ -122,7 +144,7 @@ LL | static FN_TEST3: _ = "test";
122
144
| help: replace `_` with the correct type: `&'static str`
123
145
124
146
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
125
- --> $DIR/typeck_type_placeholder_item.rs:62 :22
147
+ --> $DIR/typeck_type_placeholder_item.rs:68 :22
126
148
|
127
149
LL | static FN_TEST4: _ = 145;
128
150
| ^
@@ -131,15 +153,15 @@ LL | static FN_TEST4: _ = 145;
131
153
| help: replace `_` with the correct type: `i32`
132
154
133
155
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
134
- --> $DIR/typeck_type_placeholder_item.rs:65 :23
156
+ --> $DIR/typeck_type_placeholder_item.rs:71 :23
135
157
|
136
158
LL | static FN_TEST5: (_, _) = (1, 2);
137
159
| ^ ^ not allowed in type signatures
138
160
| |
139
161
| not allowed in type signatures
140
162
141
163
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
142
- --> $DIR/typeck_type_placeholder_item.rs:68 :20
164
+ --> $DIR/typeck_type_placeholder_item.rs:74 :20
143
165
|
144
166
LL | fn fn_test6(_: _) { }
145
167
| ^ not allowed in type signatures
@@ -150,7 +172,7 @@ LL | fn fn_test6<T>(_: T) { }
150
172
| ^^^ ^
151
173
152
174
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
153
- --> $DIR/typeck_type_placeholder_item.rs:71 :20
175
+ --> $DIR/typeck_type_placeholder_item.rs:77 :20
154
176
|
155
177
LL | fn fn_test7(x: _) { let _x: usize = x; }
156
178
| ^ not allowed in type signatures
@@ -161,7 +183,7 @@ LL | fn fn_test7<T>(x: T) { let _x: usize = x; }
161
183
| ^^^ ^
162
184
163
185
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
164
- --> $DIR/typeck_type_placeholder_item.rs:74 :29
186
+ --> $DIR/typeck_type_placeholder_item.rs:80 :29
165
187
|
166
188
LL | fn fn_test8(_f: fn() -> _) { }
167
189
| ^ not allowed in type signatures
@@ -172,7 +194,7 @@ LL | fn fn_test8<T>(_f: fn() -> T) { }
172
194
| ^^^ ^
173
195
174
196
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
175
- --> $DIR/typeck_type_placeholder_item.rs:96 :12
197
+ --> $DIR/typeck_type_placeholder_item.rs:102 :12
176
198
|
177
199
LL | a: _,
178
200
| ^ not allowed in type signatures
@@ -191,19 +213,19 @@ LL | b: (T, T),
191
213
|
192
214
193
215
error[E0282]: type annotations needed
194
- --> $DIR/typeck_type_placeholder_item.rs:101 :27
216
+ --> $DIR/typeck_type_placeholder_item.rs:107 :27
195
217
|
196
218
LL | fn fn_test11(_: _) -> (_, _) { panic!() }
197
219
| ^^^^^^ cannot infer type
198
220
199
221
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
200
- --> $DIR/typeck_type_placeholder_item.rs:101 :27
222
+ --> $DIR/typeck_type_placeholder_item.rs:107 :27
201
223
|
202
224
LL | fn fn_test11(_: _) -> (_, _) { panic!() }
203
225
| ^^^^^^ not allowed in type signatures
204
226
205
227
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
206
- --> $DIR/typeck_type_placeholder_item.rs:105 :29
228
+ --> $DIR/typeck_type_placeholder_item.rs:111 :29
207
229
|
208
230
LL | fn fn_test12(x: i32) -> (_, _) { (x, x) }
209
231
| ^^^^^^
@@ -212,7 +234,7 @@ LL | fn fn_test12(x: i32) -> (_, _) { (x, x) }
212
234
| help: replace this with the correct return type: `(i32, i32)`
213
235
214
236
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
215
- --> $DIR/typeck_type_placeholder_item.rs:108 :21
237
+ --> $DIR/typeck_type_placeholder_item.rs:114 :21
216
238
|
217
239
LL | fn fn_test13(x: _) -> (i32, _) { (x, x) }
218
240
| ^ ^ not allowed in type signatures
@@ -225,7 +247,7 @@ LL | fn fn_test13<T>(x: T) -> (i32, T) { (x, x) }
225
247
| ^^^ ^ ^
226
248
227
249
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
228
- --> $DIR/typeck_type_placeholder_item.rs:113 :31
250
+ --> $DIR/typeck_type_placeholder_item.rs:119 :31
229
251
|
230
252
LL | fn method_test1(&self, x: _);
231
253
| ^ not allowed in type signatures
@@ -236,7 +258,7 @@ LL | fn method_test1<T>(&self, x: T);
236
258
| ^^^ ^
237
259
238
260
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
239
- --> $DIR/typeck_type_placeholder_item.rs:115 :31
261
+ --> $DIR/typeck_type_placeholder_item.rs:121 :31
240
262
|
241
263
LL | fn method_test2(&self, x: _) -> _;
242
264
| ^ ^ not allowed in type signatures
@@ -249,7 +271,7 @@ LL | fn method_test2<T>(&self, x: T) -> T;
249
271
| ^^^ ^ ^
250
272
251
273
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
252
- --> $DIR/typeck_type_placeholder_item.rs:117 :31
274
+ --> $DIR/typeck_type_placeholder_item.rs:123 :31
253
275
|
254
276
LL | fn method_test3(&self) -> _;
255
277
| ^ not allowed in type signatures
@@ -260,7 +282,7 @@ LL | fn method_test3<T>(&self) -> T;
260
282
| ^^^ ^
261
283
262
284
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
263
- --> $DIR/typeck_type_placeholder_item.rs:119 :26
285
+ --> $DIR/typeck_type_placeholder_item.rs:125 :26
264
286
|
265
287
LL | fn assoc_fn_test1(x: _);
266
288
| ^ not allowed in type signatures
@@ -271,7 +293,7 @@ LL | fn assoc_fn_test1<T>(x: T);
271
293
| ^^^ ^
272
294
273
295
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
274
- --> $DIR/typeck_type_placeholder_item.rs:121 :26
296
+ --> $DIR/typeck_type_placeholder_item.rs:127 :26
275
297
|
276
298
LL | fn assoc_fn_test2(x: _) -> _;
277
299
| ^ ^ not allowed in type signatures
@@ -284,7 +306,7 @@ LL | fn assoc_fn_test2<T>(x: T) -> T;
284
306
| ^^^ ^ ^
285
307
286
308
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
287
- --> $DIR/typeck_type_placeholder_item.rs:123 :28
309
+ --> $DIR/typeck_type_placeholder_item.rs:129 :28
288
310
|
289
311
LL | fn assoc_fn_test3() -> _;
290
312
| ^ not allowed in type signatures
@@ -295,7 +317,7 @@ LL | fn assoc_fn_test3<T>() -> T;
295
317
| ^^^ ^
296
318
297
319
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
298
- --> $DIR/typeck_type_placeholder_item.rs:31 :24
320
+ --> $DIR/typeck_type_placeholder_item.rs:37 :24
299
321
|
300
322
LL | fn test9(&self) -> _ { () }
301
323
| ^
@@ -304,7 +326,7 @@ LL | fn test9(&self) -> _ { () }
304
326
| help: replace this with the correct return type: `()`
305
327
306
328
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
307
- --> $DIR/typeck_type_placeholder_item.rs:34 :27
329
+ --> $DIR/typeck_type_placeholder_item.rs:40 :27
308
330
|
309
331
LL | fn test10(&self, _x : _) { }
310
332
| ^ not allowed in type signatures
@@ -315,7 +337,7 @@ LL | fn test10<T>(&self, _x : T) { }
315
337
| ^^^ ^
316
338
317
339
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
318
- --> $DIR/typeck_type_placeholder_item.rs:39 :24
340
+ --> $DIR/typeck_type_placeholder_item.rs:45 :24
319
341
|
320
342
LL | fn clone(&self) -> _ { Test9 }
321
343
| ^
@@ -324,7 +346,7 @@ LL | fn clone(&self) -> _ { Test9 }
324
346
| help: replace this with the correct return type: `Test9`
325
347
326
348
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
327
- --> $DIR/typeck_type_placeholder_item.rs:42 :37
349
+ --> $DIR/typeck_type_placeholder_item.rs:48 :37
328
350
|
329
351
LL | fn clone_from(&mut self, other: _) { *self = Test9; }
330
352
| ^ not allowed in type signatures
@@ -335,7 +357,7 @@ LL | fn clone_from<T>(&mut self, other: T) { *self = Test9; }
335
357
| ^^^ ^
336
358
337
359
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
338
- --> $DIR/typeck_type_placeholder_item.rs:80 :31
360
+ --> $DIR/typeck_type_placeholder_item.rs:86 :31
339
361
|
340
362
LL | fn fn_test9(&self) -> _ { () }
341
363
| ^
@@ -344,7 +366,7 @@ LL | fn fn_test9(&self) -> _ { () }
344
366
| help: replace this with the correct return type: `()`
345
367
346
368
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
347
- --> $DIR/typeck_type_placeholder_item.rs:83 :34
369
+ --> $DIR/typeck_type_placeholder_item.rs:89 :34
348
370
|
349
371
LL | fn fn_test10(&self, _x : _) { }
350
372
| ^ not allowed in type signatures
@@ -355,7 +377,7 @@ LL | fn fn_test10<T>(&self, _x : T) { }
355
377
| ^^^ ^
356
378
357
379
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
358
- --> $DIR/typeck_type_placeholder_item.rs:88 :28
380
+ --> $DIR/typeck_type_placeholder_item.rs:94 :28
359
381
|
360
382
LL | fn clone(&self) -> _ { FnTest9 }
361
383
| ^
@@ -364,7 +386,7 @@ LL | fn clone(&self) -> _ { FnTest9 }
364
386
| help: replace this with the correct return type: `main::FnTest9`
365
387
366
388
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
367
- --> $DIR/typeck_type_placeholder_item.rs:91 :41
389
+ --> $DIR/typeck_type_placeholder_item.rs:97 :41
368
390
|
369
391
LL | fn clone_from(&mut self, other: _) { *self = FnTest9; }
370
392
| ^ not allowed in type signatures
@@ -374,7 +396,7 @@ help: use type parameters instead
374
396
LL | fn clone_from<T>(&mut self, other: T) { *self = FnTest9; }
375
397
| ^^^ ^
376
398
377
- error: aborting due to 36 previous errors
399
+ error: aborting due to 38 previous errors
378
400
379
401
Some errors have detailed explanations: E0121, E0282.
380
402
For more information about an error, try `rustc --explain E0121`.
0 commit comments