]> git.proxmox.com Git - rustc.git/blame - tests/ui/typeck/typeck_type_placeholder_item.stderr
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / typeck / typeck_type_placeholder_item.stderr
CommitLineData
74b04a01 1error: expected identifier, found reserved identifier `_`
94222f64 2 --> $DIR/typeck_type_placeholder_item.rs:154:18
74b04a01
XL
3 |
4LL | struct BadStruct<_>(_);
5 | ^ expected identifier, found reserved identifier
6
7error: expected identifier, found reserved identifier `_`
94222f64 8 --> $DIR/typeck_type_placeholder_item.rs:157:16
74b04a01
XL
9 |
10LL | trait BadTrait<_> {}
11 | ^ expected identifier, found reserved identifier
12
13error: expected identifier, found reserved identifier `_`
94222f64 14 --> $DIR/typeck_type_placeholder_item.rs:167:19
74b04a01
XL
15 |
16LL | struct BadStruct1<_, _>(_);
17 | ^ expected identifier, found reserved identifier
18
19error: expected identifier, found reserved identifier `_`
94222f64 20 --> $DIR/typeck_type_placeholder_item.rs:167:22
74b04a01
XL
21 |
22LL | struct BadStruct1<_, _>(_);
23 | ^ expected identifier, found reserved identifier
24
25error: expected identifier, found reserved identifier `_`
94222f64 26 --> $DIR/typeck_type_placeholder_item.rs:172:19
74b04a01
XL
27 |
28LL | struct BadStruct2<_, T>(_, T);
29 | ^ expected identifier, found reserved identifier
30
31error: associated constant in `impl` without body
94222f64 32 --> $DIR/typeck_type_placeholder_item.rs:205:5
74b04a01
XL
33 |
34LL | const C: _;
35 | ^^^^^^^^^^-
36 | |
37 | help: provide a definition for the constant: `= <expr>;`
38
39error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters
94222f64 40 --> $DIR/typeck_type_placeholder_item.rs:167:22
74b04a01
XL
41 |
42LL | struct BadStruct1<_, _>(_);
43 | - ^ already used
44 | |
45 | first use of `_`
46
5099ac24 47error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
94222f64 48 --> $DIR/typeck_type_placeholder_item.rs:7:14
74b04a01
XL
49 |
50LL | fn test() -> _ { 5 }
51 | ^
52 | |
53 | not allowed in type signatures
54 | help: replace with the correct return type: `i32`
55
5099ac24 56error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
94222f64 57 --> $DIR/typeck_type_placeholder_item.rs:10:16
74b04a01
XL
58 |
59LL | fn test2() -> (_, _) { (5, 5) }
60 | -^--^-
61 | || |
62 | || not allowed in type signatures
63 | |not allowed in type signatures
64 | help: replace with the correct return type: `(i32, i32)`
65
5099ac24 66error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
94222f64 67 --> $DIR/typeck_type_placeholder_item.rs:13:15
74b04a01
XL
68 |
69LL | static TEST3: _ = "test";
70 | ^
71 | |
72 | not allowed in type signatures
17df50a5 73 | help: replace with the correct type: `&str`
74b04a01 74
5099ac24 75error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
94222f64 76 --> $DIR/typeck_type_placeholder_item.rs:16:15
74b04a01
XL
77 |
78LL | static TEST4: _ = 145;
79 | ^
80 | |
81 | not allowed in type signatures
17df50a5 82 | help: replace with the correct type: `i32`
74b04a01 83
5099ac24 84error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
94222f64 85 --> $DIR/typeck_type_placeholder_item.rs:19:15
74b04a01
XL
86 |
87LL | static TEST5: (_, _) = (1, 2);
88 | ^^^^^^ not allowed in type signatures
89
5099ac24 90error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 91 --> $DIR/typeck_type_placeholder_item.rs:22:13
74b04a01
XL
92 |
93LL | fn test6(_: _) { }
94 | ^ not allowed in type signatures
95 |
96help: use type parameters instead
97 |
98LL | fn test6<T>(_: T) { }
94222f64 99 | +++ ~
74b04a01 100
5099ac24 101error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 102 --> $DIR/typeck_type_placeholder_item.rs:25:18
74b04a01
XL
103 |
104LL | fn test6_b<T>(_: _, _: T) { }
105 | ^ not allowed in type signatures
106 |
107help: use type parameters instead
108 |
ba9703b0 109LL | fn test6_b<T, U>(_: U, _: T) { }
94222f64 110 | +++ ~
74b04a01 111
5099ac24 112error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 113 --> $DIR/typeck_type_placeholder_item.rs:28:30
74b04a01
XL
114 |
115LL | fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
116 | ^ not allowed in type signatures
117 |
118help: use type parameters instead
119 |
ba9703b0 120LL | fn test6_c<T, K, L, A, B, U>(_: U, _: (T, K, L, A, B)) { }
94222f64 121 | +++ ~
74b04a01 122
5099ac24 123error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 124 --> $DIR/typeck_type_placeholder_item.rs:31:13
74b04a01
XL
125 |
126LL | fn test7(x: _) { let _x: usize = x; }
127 | ^ not allowed in type signatures
128 |
129help: use type parameters instead
130 |
131LL | fn test7<T>(x: T) { let _x: usize = x; }
94222f64 132 | +++ ~
74b04a01 133
5099ac24 134error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 135 --> $DIR/typeck_type_placeholder_item.rs:34:22
3dfed10e
XL
136 |
137LL | fn test8(_f: fn() -> _) { }
138 | ^
139 | |
140 | not allowed in type signatures
141 | help: use type parameters instead: `T`
142
5099ac24 143error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 144 --> $DIR/typeck_type_placeholder_item.rs:34:22
74b04a01
XL
145 |
146LL | fn test8(_f: fn() -> _) { }
147 | ^ not allowed in type signatures
148 |
149help: use type parameters instead
150 |
151LL | fn test8<T>(_f: fn() -> T) { }
94222f64 152 | +++ ~
74b04a01 153
5099ac24 154error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
94222f64 155 --> $DIR/typeck_type_placeholder_item.rs:48:26
74b04a01
XL
156 |
157LL | fn test11(x: &usize) -> &_ {
158 | -^
159 | ||
160 | |not allowed in type signatures
5869c6ff 161 | help: replace with the correct return type: `&'static &'static usize`
74b04a01 162
5099ac24 163error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
94222f64 164 --> $DIR/typeck_type_placeholder_item.rs:53:52
74b04a01
XL
165 |
166LL | unsafe fn test12(x: *const usize) -> *const *const _ {
167 | --------------^
168 | | |
169 | | not allowed in type signatures
170 | help: replace with the correct return type: `*const *const usize`
171
5099ac24 172error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
94222f64 173 --> $DIR/typeck_type_placeholder_item.rs:67:8
74b04a01
XL
174 |
175LL | a: _,
176 | ^ not allowed in type signatures
177LL |
178LL | b: (_, _),
179 | ^ ^ not allowed in type signatures
180 | |
181 | not allowed in type signatures
182 |
183help: use type parameters instead
184 |
94222f64
XL
185LL ~ struct Test10<T> {
186LL ~ a: T,
74b04a01 187LL |
94222f64 188LL ~ b: (T, T),
74b04a01
XL
189 |
190
191error: missing type for `static` item
f2b60f7d 192 --> $DIR/typeck_type_placeholder_item.rs:73:13
74b04a01
XL
193 |
194LL | static A = 42;
f2b60f7d 195 | ^ help: provide a type for the static variable: `: i32`
74b04a01 196
5099ac24 197error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
94222f64 198 --> $DIR/typeck_type_placeholder_item.rs:75:15
74b04a01
XL
199 |
200LL | static B: _ = 42;
201 | ^
202 | |
203 | not allowed in type signatures
17df50a5 204 | help: replace with the correct type: `i32`
74b04a01 205
5099ac24 206error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
94222f64 207 --> $DIR/typeck_type_placeholder_item.rs:77:15
74b04a01
XL
208 |
209LL | static C: Option<_> = Some(42);
210 | ^^^^^^^^^ not allowed in type signatures
211
5099ac24 212error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
94222f64 213 --> $DIR/typeck_type_placeholder_item.rs:79:21
74b04a01
XL
214 |
215LL | fn fn_test() -> _ { 5 }
216 | ^
217 | |
218 | not allowed in type signatures
219 | help: replace with the correct return type: `i32`
220
5099ac24 221error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
94222f64 222 --> $DIR/typeck_type_placeholder_item.rs:82:23
74b04a01
XL
223 |
224LL | fn fn_test2() -> (_, _) { (5, 5) }
225 | -^--^-
226 | || |
227 | || not allowed in type signatures
228 | |not allowed in type signatures
229 | help: replace with the correct return type: `(i32, i32)`
230
5099ac24 231error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
94222f64 232 --> $DIR/typeck_type_placeholder_item.rs:85:22
74b04a01
XL
233 |
234LL | static FN_TEST3: _ = "test";
235 | ^
236 | |
237 | not allowed in type signatures
17df50a5 238 | help: replace with the correct type: `&str`
74b04a01 239
5099ac24 240error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
94222f64 241 --> $DIR/typeck_type_placeholder_item.rs:88:22
74b04a01
XL
242 |
243LL | static FN_TEST4: _ = 145;
244 | ^
245 | |
246 | not allowed in type signatures
17df50a5 247 | help: replace with the correct type: `i32`
74b04a01 248
5099ac24 249error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
94222f64 250 --> $DIR/typeck_type_placeholder_item.rs:91:22
74b04a01
XL
251 |
252LL | static FN_TEST5: (_, _) = (1, 2);
253 | ^^^^^^ not allowed in type signatures
254
5099ac24 255error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 256 --> $DIR/typeck_type_placeholder_item.rs:94:20
74b04a01
XL
257 |
258LL | fn fn_test6(_: _) { }
259 | ^ not allowed in type signatures
260 |
261help: use type parameters instead
262 |
263LL | fn fn_test6<T>(_: T) { }
94222f64 264 | +++ ~
74b04a01 265
5099ac24 266error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 267 --> $DIR/typeck_type_placeholder_item.rs:97:20
74b04a01
XL
268 |
269LL | fn fn_test7(x: _) { let _x: usize = x; }
270 | ^ not allowed in type signatures
271 |
272help: use type parameters instead
273 |
274LL | fn fn_test7<T>(x: T) { let _x: usize = x; }
94222f64 275 | +++ ~
74b04a01 276
5099ac24 277error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 278 --> $DIR/typeck_type_placeholder_item.rs:100:29
3dfed10e
XL
279 |
280LL | fn fn_test8(_f: fn() -> _) { }
281 | ^
282 | |
283 | not allowed in type signatures
284 | help: use type parameters instead: `T`
285
5099ac24 286error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 287 --> $DIR/typeck_type_placeholder_item.rs:100:29
74b04a01
XL
288 |
289LL | fn fn_test8(_f: fn() -> _) { }
290 | ^ not allowed in type signatures
291 |
292help: use type parameters instead
293 |
294LL | fn fn_test8<T>(_f: fn() -> T) { }
94222f64 295 | +++ ~
74b04a01 296
5099ac24 297error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
94222f64 298 --> $DIR/typeck_type_placeholder_item.rs:123:12
74b04a01
XL
299 |
300LL | a: _,
301 | ^ not allowed in type signatures
302LL |
303LL | b: (_, _),
304 | ^ ^ not allowed in type signatures
305 | |
306 | not allowed in type signatures
307 |
308help: use type parameters instead
309 |
94222f64
XL
310LL ~ struct FnTest10<T> {
311LL ~ a: T,
74b04a01 312LL |
94222f64 313LL ~ b: (T, T),
74b04a01
XL
314 |
315
316error[E0282]: type annotations needed
94222f64 317 --> $DIR/typeck_type_placeholder_item.rs:128:18
74b04a01
XL
318 |
319LL | fn fn_test11(_: _) -> (_, _) { panic!() }
320 | ^ cannot infer type
321
5099ac24 322error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
94222f64 323 --> $DIR/typeck_type_placeholder_item.rs:128:28
74b04a01
XL
324 |
325LL | fn fn_test11(_: _) -> (_, _) { panic!() }
326 | ^ ^ not allowed in type signatures
327 | |
328 | not allowed in type signatures
329
5099ac24 330error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
94222f64 331 --> $DIR/typeck_type_placeholder_item.rs:132:30
74b04a01
XL
332 |
333LL | fn fn_test12(x: i32) -> (_, _) { (x, x) }
334 | -^--^-
335 | || |
336 | || not allowed in type signatures
337 | |not allowed in type signatures
338 | help: replace with the correct return type: `(i32, i32)`
339
5099ac24 340error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
94222f64 341 --> $DIR/typeck_type_placeholder_item.rs:135:33
74b04a01
XL
342 |
343LL | fn fn_test13(x: _) -> (i32, _) { (x, x) }
344 | ------^-
345 | | |
346 | | not allowed in type signatures
347 | help: replace with the correct return type: `(i32, i32)`
348
5099ac24 349error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
94222f64 350 --> $DIR/typeck_type_placeholder_item.rs:154:21
74b04a01
XL
351 |
352LL | struct BadStruct<_>(_);
353 | ^ not allowed in type signatures
354 |
355help: use type parameters instead
356 |
357LL | struct BadStruct<T>(T);
94222f64 358 | ~ ~
74b04a01 359
5099ac24 360error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
94222f64 361 --> $DIR/typeck_type_placeholder_item.rs:159:15
74b04a01
XL
362 |
363LL | impl BadTrait<_> for BadStruct<_> {}
364 | ^ ^ not allowed in type signatures
365 | |
366 | not allowed in type signatures
367 |
368help: use type parameters instead
369 |
370LL | impl<T> BadTrait<T> for BadStruct<T> {}
94222f64 371 | +++ ~ ~
74b04a01 372
5099ac24 373error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
94222f64 374 --> $DIR/typeck_type_placeholder_item.rs:162:34
74b04a01
XL
375 |
376LL | fn impl_trait() -> impl BadTrait<_> {
377 | ^ not allowed in type signatures
378
5099ac24 379error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
94222f64 380 --> $DIR/typeck_type_placeholder_item.rs:167:25
74b04a01
XL
381 |
382LL | struct BadStruct1<_, _>(_);
383 | ^ not allowed in type signatures
384 |
385help: use type parameters instead
386 |
387LL | struct BadStruct1<T, _>(T);
94222f64 388 | ~ ~
74b04a01 389
5099ac24 390error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
94222f64 391 --> $DIR/typeck_type_placeholder_item.rs:172:25
74b04a01
XL
392 |
393LL | struct BadStruct2<_, T>(_, T);
394 | ^ not allowed in type signatures
395 |
396help: use type parameters instead
397 |
ba9703b0 398LL | struct BadStruct2<U, T>(U, T);
94222f64 399 | ~ ~
74b04a01 400
5099ac24 401error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
94222f64 402 --> $DIR/typeck_type_placeholder_item.rs:176:14
74b04a01
XL
403 |
404LL | type X = Box<_>;
405 | ^ not allowed in type signatures
406
5099ac24 407error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
94222f64 408 --> $DIR/typeck_type_placeholder_item.rs:182:21
74b04a01 409 |
1b1a35ee
XL
410LL | type Y = impl Trait<_>;
411 | ^ not allowed in type signatures
74b04a01 412
5099ac24 413error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
94222f64 414 --> $DIR/typeck_type_placeholder_item.rs:216:31
5869c6ff
XL
415 |
416LL | fn value() -> Option<&'static _> {
417 | ----------------^-
418 | | |
419 | | not allowed in type signatures
420 | help: replace with the correct return type: `Option<&'static u8>`
421
5099ac24 422error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
94222f64 423 --> $DIR/typeck_type_placeholder_item.rs:221:10
5869c6ff
XL
424 |
425LL | const _: Option<_> = map(value);
426 | ^^^^^^^^^
427 | |
428 | not allowed in type signatures
17df50a5 429 | help: replace with the correct type: `Option<u8>`
5869c6ff 430
9c376795
FG
431error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
432 --> $DIR/typeck_type_placeholder_item.rs:224:31
433 |
434LL | fn evens_squared(n: usize) -> _ {
435 | ^
436 | |
437 | not allowed in type signatures
438 | help: replace with an appropriate return type: `impl Iterator<Item = usize>`
439
9ffffee4
FG
440error[E0277]: the trait bound `std::ops::Range<{integer}>: Iterator` is not satisfied
441 --> $DIR/typeck_type_placeholder_item.rs:229:22
9c376795
FG
442 |
443LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
9ffffee4
FG
444 | ^^^^^^ `std::ops::Range<{integer}>` is not an iterator
445 |
446 = help: the trait `~const Iterator` is not implemented for `std::ops::Range<{integer}>`
447note: the trait `Iterator` is implemented for `std::ops::Range<{integer}>`, but that implementation is not `const`
448 --> $DIR/typeck_type_placeholder_item.rs:229:14
449 |
450LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
451 | ^^^^^^^
452
453error[E0277]: the trait bound `Filter<std::ops::Range<{integer}>, [closure@$DIR/typeck_type_placeholder_item.rs:229:29: 229:32]>: Iterator` is not satisfied
454 --> $DIR/typeck_type_placeholder_item.rs:229:45
9c376795 455 |
9ffffee4
FG
456LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
457 | ^^^ `Filter<std::ops::Range<{integer}>, [closure@$DIR/typeck_type_placeholder_item.rs:229:29: 229:32]>` is not an iterator
458 |
459 = help: the trait `~const Iterator` is not implemented for `Filter<std::ops::Range<{integer}>, [closure@$DIR/typeck_type_placeholder_item.rs:229:29: 229:32]>`
460note: the trait `Iterator` is implemented for `Filter<std::ops::Range<{integer}>, [closure@$DIR/typeck_type_placeholder_item.rs:229:29: 229:32]>`, but that implementation is not `const`
9c376795
FG
461 --> $DIR/typeck_type_placeholder_item.rs:229:14
462 |
463LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
9ffffee4
FG
464 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
465
466error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
467 --> $DIR/typeck_type_placeholder_item.rs:229:10
468 |
469LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
470 | ^ not allowed in type signatures
9c376795 471
5099ac24 472error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 473 --> $DIR/typeck_type_placeholder_item.rs:140:31
74b04a01
XL
474 |
475LL | fn method_test1(&self, x: _);
476 | ^ not allowed in type signatures
477 |
478help: use type parameters instead
479 |
480LL | fn method_test1<T>(&self, x: T);
94222f64 481 | +++ ~
74b04a01 482
5099ac24 483error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 484 --> $DIR/typeck_type_placeholder_item.rs:142:31
74b04a01
XL
485 |
486LL | fn method_test2(&self, x: _) -> _;
487 | ^ ^ not allowed in type signatures
488 | |
489 | not allowed in type signatures
490 |
491help: use type parameters instead
492 |
493LL | fn method_test2<T>(&self, x: T) -> T;
94222f64 494 | +++ ~ ~
74b04a01 495
5099ac24 496error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 497 --> $DIR/typeck_type_placeholder_item.rs:144:31
74b04a01
XL
498 |
499LL | fn method_test3(&self) -> _;
500 | ^ not allowed in type signatures
501 |
502help: use type parameters instead
503 |
504LL | fn method_test3<T>(&self) -> T;
94222f64 505 | +++ ~
74b04a01 506
5099ac24 507error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 508 --> $DIR/typeck_type_placeholder_item.rs:146:26
74b04a01
XL
509 |
510LL | fn assoc_fn_test1(x: _);
511 | ^ not allowed in type signatures
512 |
513help: use type parameters instead
514 |
515LL | fn assoc_fn_test1<T>(x: T);
94222f64 516 | +++ ~
74b04a01 517
5099ac24 518error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 519 --> $DIR/typeck_type_placeholder_item.rs:148:26
74b04a01
XL
520 |
521LL | fn assoc_fn_test2(x: _) -> _;
522 | ^ ^ not allowed in type signatures
523 | |
524 | not allowed in type signatures
525 |
526help: use type parameters instead
527 |
528LL | fn assoc_fn_test2<T>(x: T) -> T;
94222f64 529 | +++ ~ ~
74b04a01 530
5099ac24 531error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 532 --> $DIR/typeck_type_placeholder_item.rs:150:28
74b04a01
XL
533 |
534LL | fn assoc_fn_test3() -> _;
535 | ^ not allowed in type signatures
536 |
537help: use type parameters instead
538 |
539LL | fn assoc_fn_test3<T>() -> T;
94222f64 540 | +++ ~
74b04a01 541
5099ac24 542error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
94222f64 543 --> $DIR/typeck_type_placeholder_item.rs:190:14
74b04a01
XL
544 |
545LL | type B = _;
546 | ^ not allowed in type signatures
547
5099ac24 548error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
94222f64 549 --> $DIR/typeck_type_placeholder_item.rs:192:14
74b04a01
XL
550 |
551LL | const C: _;
552 | ^ not allowed in type signatures
553
5099ac24 554error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
94222f64 555 --> $DIR/typeck_type_placeholder_item.rs:194:14
74b04a01
XL
556 |
557LL | const D: _ = 42;
558 | ^
559 | |
560 | not allowed in type signatures
17df50a5 561 | help: replace with the correct type: `i32`
74b04a01 562
5099ac24 563error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
94222f64 564 --> $DIR/typeck_type_placeholder_item.rs:197:26
3dfed10e
XL
565 |
566LL | type F: std::ops::Fn(_);
567 | ^ not allowed in type signatures
568
5099ac24 569error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
94222f64 570 --> $DIR/typeck_type_placeholder_item.rs:41:24
74b04a01
XL
571 |
572LL | fn test9(&self) -> _ { () }
573 | ^
574 | |
575 | not allowed in type signatures
576 | help: replace with the correct return type: `()`
577
5099ac24 578error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 579 --> $DIR/typeck_type_placeholder_item.rs:44:27
1b1a35ee
XL
580 |
581LL | fn test10(&self, _x : _) { }
582 | ^ not allowed in type signatures
583 |
584help: use type parameters instead
585 |
586LL | fn test10<T>(&self, _x : T) { }
94222f64 587 | +++ ~
1b1a35ee 588
04454e1e 589error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 590 --> $DIR/typeck_type_placeholder_item.rs:59:24
74b04a01
XL
591 |
592LL | fn clone(&self) -> _ { Test9 }
04454e1e
FG
593 | ^ not allowed in type signatures
594 |
595help: try replacing `_` with the type in the corresponding trait method signature
596 |
597LL | fn clone(&self) -> Test9 { Test9 }
598 | ~~~~~
74b04a01 599
5099ac24 600error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 601 --> $DIR/typeck_type_placeholder_item.rs:62:37
1b1a35ee
XL
602 |
603LL | fn clone_from(&mut self, other: _) { *self = Test9; }
604 | ^ not allowed in type signatures
605 |
04454e1e 606help: try replacing `_` with the type in the corresponding trait method signature
1b1a35ee 607 |
04454e1e
FG
608LL | fn clone_from(&mut self, other: &Test9) { *self = Test9; }
609 | ~~~~~~
1b1a35ee 610
5099ac24 611error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
94222f64 612 --> $DIR/typeck_type_placeholder_item.rs:107:31
74b04a01
XL
613 |
614LL | fn fn_test9(&self) -> _ { () }
615 | ^
616 | |
617 | not allowed in type signatures
618 | help: replace with the correct return type: `()`
619
5099ac24 620error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 621 --> $DIR/typeck_type_placeholder_item.rs:110:34
1b1a35ee
XL
622 |
623LL | fn fn_test10(&self, _x : _) { }
624 | ^ not allowed in type signatures
625 |
626help: use type parameters instead
627 |
628LL | fn fn_test10<T>(&self, _x : T) { }
94222f64 629 | +++ ~
1b1a35ee 630
04454e1e 631error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 632 --> $DIR/typeck_type_placeholder_item.rs:115:28
74b04a01
XL
633 |
634LL | fn clone(&self) -> _ { FnTest9 }
04454e1e
FG
635 | ^ not allowed in type signatures
636 |
637help: try replacing `_` with the type in the corresponding trait method signature
638 |
639LL | fn clone(&self) -> FnTest9 { FnTest9 }
640 | ~~~~~~~
1b1a35ee 641
5099ac24 642error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
94222f64 643 --> $DIR/typeck_type_placeholder_item.rs:118:41
1b1a35ee
XL
644 |
645LL | fn clone_from(&mut self, other: _) { *self = FnTest9; }
646 | ^ not allowed in type signatures
647 |
04454e1e 648help: try replacing `_` with the type in the corresponding trait method signature
1b1a35ee 649 |
04454e1e
FG
650LL | fn clone_from(&mut self, other: &FnTest9) { *self = FnTest9; }
651 | ~~~~~~~~
74b04a01 652
5099ac24 653error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
94222f64 654 --> $DIR/typeck_type_placeholder_item.rs:201:14
74b04a01
XL
655 |
656LL | type A = _;
657 | ^ not allowed in type signatures
658
5099ac24 659error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated types
94222f64 660 --> $DIR/typeck_type_placeholder_item.rs:203:14
74b04a01
XL
661 |
662LL | type B = _;
663 | ^ not allowed in type signatures
664
5099ac24 665error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
94222f64 666 --> $DIR/typeck_type_placeholder_item.rs:205:14
74b04a01
XL
667 |
668LL | const C: _;
669 | ^ not allowed in type signatures
670
5099ac24 671error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
94222f64 672 --> $DIR/typeck_type_placeholder_item.rs:208:14
74b04a01
XL
673 |
674LL | const D: _ = 42;
675 | ^
676 | |
677 | not allowed in type signatures
17df50a5 678 | help: replace with the correct type: `i32`
74b04a01 679
9ffffee4 680error: aborting due to 73 previous errors
74b04a01 681
9ffffee4 682Some errors have detailed explanations: E0121, E0277, E0282, E0403.
74b04a01 683For more information about an error, try `rustc --explain E0121`.