1 error: expected identifier, found reserved identifier `_`
2 --> $DIR/typeck_type_placeholder_item.rs:154:18
4 LL | struct BadStruct<_>(_);
5 | ^ expected identifier, found reserved identifier
7 error: expected identifier, found reserved identifier `_`
8 --> $DIR/typeck_type_placeholder_item.rs:157:16
10 LL | trait BadTrait<_> {}
11 | ^ expected identifier, found reserved identifier
13 error: expected identifier, found reserved identifier `_`
14 --> $DIR/typeck_type_placeholder_item.rs:167:19
16 LL | struct BadStruct1<_, _>(_);
17 | ^ expected identifier, found reserved identifier
19 error: expected identifier, found reserved identifier `_`
20 --> $DIR/typeck_type_placeholder_item.rs:167:22
22 LL | struct BadStruct1<_, _>(_);
23 | ^ expected identifier, found reserved identifier
25 error: expected identifier, found reserved identifier `_`
26 --> $DIR/typeck_type_placeholder_item.rs:172:19
28 LL | struct BadStruct2<_, T>(_, T);
29 | ^ expected identifier, found reserved identifier
31 error: associated constant in `impl` without body
32 --> $DIR/typeck_type_placeholder_item.rs:205:5
37 | help: provide a definition for the constant: `= <expr>;`
39 error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters
40 --> $DIR/typeck_type_placeholder_item.rs:167:22
42 LL | struct BadStruct1<_, _>(_);
47 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
48 --> $DIR/typeck_type_placeholder_item.rs:6:14
50 LL | fn test() -> _ { 5 }
53 | not allowed in type signatures
54 | help: replace with the correct return type: `i32`
56 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
57 --> $DIR/typeck_type_placeholder_item.rs:9:16
59 LL | fn test2() -> (_, _) { (5, 5) }
62 | || not allowed in type signatures
63 | |not allowed in type signatures
64 | help: replace with the correct return type: `(i32, i32)`
66 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
67 --> $DIR/typeck_type_placeholder_item.rs:12:15
69 LL | static TEST3: _ = "test";
72 | not allowed in type signatures
73 | help: replace `_` with the correct type: `&str`
75 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
76 --> $DIR/typeck_type_placeholder_item.rs:15:15
78 LL | static TEST4: _ = 145;
81 | not allowed in type signatures
82 | help: replace `_` with the correct type: `i32`
84 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
85 --> $DIR/typeck_type_placeholder_item.rs:18:15
87 LL | static TEST5: (_, _) = (1, 2);
88 | ^^^^^^ not allowed in type signatures
90 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
91 --> $DIR/typeck_type_placeholder_item.rs:21:13
93 LL | fn test6(_: _) { }
94 | ^ not allowed in type signatures
96 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
97 --> $DIR/typeck_type_placeholder_item.rs:24:18
99 LL | fn test6_b<T>(_: _, _: T) { }
100 | ^ not allowed in type signatures
102 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
103 --> $DIR/typeck_type_placeholder_item.rs:27:30
105 LL | fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
106 | ^ not allowed in type signatures
108 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
109 --> $DIR/typeck_type_placeholder_item.rs:30:13
111 LL | fn test7(x: _) { let _x: usize = x; }
112 | ^ not allowed in type signatures
114 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
115 --> $DIR/typeck_type_placeholder_item.rs:33:22
117 LL | fn test8(_f: fn() -> _) { }
118 | ^ not allowed in type signatures
120 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
121 --> $DIR/typeck_type_placeholder_item.rs:33:22
123 LL | fn test8(_f: fn() -> _) { }
124 | ^ not allowed in type signatures
126 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
127 --> $DIR/typeck_type_placeholder_item.rs:47:26
129 LL | fn test11(x: &usize) -> &_ {
132 | |not allowed in type signatures
133 | help: replace with the correct return type: `&&usize`
135 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
136 --> $DIR/typeck_type_placeholder_item.rs:52:52
138 LL | unsafe fn test12(x: *const usize) -> *const *const _ {
141 | | not allowed in type signatures
142 | help: replace with the correct return type: `*const *const usize`
144 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
145 --> $DIR/typeck_type_placeholder_item.rs:66:8
148 | ^ not allowed in type signatures
151 | ^ ^ not allowed in type signatures
153 | not allowed in type signatures
155 help: use type parameters instead
157 LL | struct Test10<T> {
163 error: missing type for `static` item
164 --> $DIR/typeck_type_placeholder_item.rs:72:12
167 | ^ help: provide a type for the item: `A: i32`
169 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
170 --> $DIR/typeck_type_placeholder_item.rs:74:15
172 LL | static B: _ = 42;
175 | not allowed in type signatures
176 | help: replace `_` with the correct type: `i32`
178 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
179 --> $DIR/typeck_type_placeholder_item.rs:76:15
181 LL | static C: Option<_> = Some(42);
182 | ^^^^^^^^^ not allowed in type signatures
184 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
185 --> $DIR/typeck_type_placeholder_item.rs:79:21
187 LL | fn fn_test() -> _ { 5 }
190 | not allowed in type signatures
191 | help: replace with the correct return type: `i32`
193 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
194 --> $DIR/typeck_type_placeholder_item.rs:82:23
196 LL | fn fn_test2() -> (_, _) { (5, 5) }
199 | || not allowed in type signatures
200 | |not allowed in type signatures
201 | help: replace with the correct return type: `(i32, i32)`
203 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
204 --> $DIR/typeck_type_placeholder_item.rs:85:22
206 LL | static FN_TEST3: _ = "test";
209 | not allowed in type signatures
210 | help: replace `_` with the correct type: `&str`
212 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
213 --> $DIR/typeck_type_placeholder_item.rs:88:22
215 LL | static FN_TEST4: _ = 145;
218 | not allowed in type signatures
219 | help: replace `_` with the correct type: `i32`
221 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
222 --> $DIR/typeck_type_placeholder_item.rs:91:22
224 LL | static FN_TEST5: (_, _) = (1, 2);
225 | ^^^^^^ not allowed in type signatures
227 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
228 --> $DIR/typeck_type_placeholder_item.rs:94:20
230 LL | fn fn_test6(_: _) { }
231 | ^ not allowed in type signatures
233 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
234 --> $DIR/typeck_type_placeholder_item.rs:97:20
236 LL | fn fn_test7(x: _) { let _x: usize = x; }
237 | ^ not allowed in type signatures
239 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
240 --> $DIR/typeck_type_placeholder_item.rs:100:29
242 LL | fn fn_test8(_f: fn() -> _) { }
243 | ^ not allowed in type signatures
245 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
246 --> $DIR/typeck_type_placeholder_item.rs:100:29
248 LL | fn fn_test8(_f: fn() -> _) { }
249 | ^ not allowed in type signatures
251 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
252 --> $DIR/typeck_type_placeholder_item.rs:123:12
255 | ^ not allowed in type signatures
258 | ^ ^ not allowed in type signatures
260 | not allowed in type signatures
262 help: use type parameters instead
264 LL | struct FnTest10<T> {
270 error[E0282]: type annotations needed
271 --> $DIR/typeck_type_placeholder_item.rs:128:18
273 LL | fn fn_test11(_: _) -> (_, _) { panic!() }
274 | ^ cannot infer type
276 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
277 --> $DIR/typeck_type_placeholder_item.rs:128:28
279 LL | fn fn_test11(_: _) -> (_, _) { panic!() }
280 | ^ ^ not allowed in type signatures
282 | not allowed in type signatures
284 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
285 --> $DIR/typeck_type_placeholder_item.rs:132:30
287 LL | fn fn_test12(x: i32) -> (_, _) { (x, x) }
290 | || not allowed in type signatures
291 | |not allowed in type signatures
292 | help: replace with the correct return type: `(i32, i32)`
294 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
295 --> $DIR/typeck_type_placeholder_item.rs:135:33
297 LL | fn fn_test13(x: _) -> (i32, _) { (x, x) }
300 | | not allowed in type signatures
301 | help: replace with the correct return type: `(i32, i32)`
303 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
304 --> $DIR/typeck_type_placeholder_item.rs:154:21
306 LL | struct BadStruct<_>(_);
307 | ^ not allowed in type signatures
309 help: use type parameters instead
311 LL | struct BadStruct<T>(T);
314 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
315 --> $DIR/typeck_type_placeholder_item.rs:159:15
317 LL | impl BadTrait<_> for BadStruct<_> {}
318 | ^ ^ not allowed in type signatures
320 | not allowed in type signatures
322 help: use type parameters instead
324 LL | impl<T> BadTrait<T> for BadStruct<T> {}
327 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
328 --> $DIR/typeck_type_placeholder_item.rs:162:34
330 LL | fn impl_trait() -> impl BadTrait<_> {
331 | ^ not allowed in type signatures
333 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
334 --> $DIR/typeck_type_placeholder_item.rs:167:25
336 LL | struct BadStruct1<_, _>(_);
337 | ^ not allowed in type signatures
339 help: use type parameters instead
341 LL | struct BadStruct1<T, _>(T);
344 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
345 --> $DIR/typeck_type_placeholder_item.rs:172:25
347 LL | struct BadStruct2<_, T>(_, T);
348 | ^ not allowed in type signatures
350 help: use type parameters instead
352 LL | struct BadStruct2<U, T>(U, T);
355 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
356 --> $DIR/typeck_type_placeholder_item.rs:176:14
358 LL | type X = Box<_>;
359 | ^ not allowed in type signatures
361 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
362 --> $DIR/typeck_type_placeholder_item.rs:182:21
364 LL | type Y = impl Trait<_>;
365 | ^ not allowed in type signatures
367 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
368 --> $DIR/typeck_type_placeholder_item.rs:140:31
370 LL | fn method_test1(&self, x: _);
371 | ^ not allowed in type signatures
373 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
374 --> $DIR/typeck_type_placeholder_item.rs:142:31
376 LL | fn method_test2(&self, x: _) -> _;
377 | ^ ^ not allowed in type signatures
379 | not allowed in type signatures
381 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
382 --> $DIR/typeck_type_placeholder_item.rs:144:31
384 LL | fn method_test3(&self) -> _;
385 | ^ not allowed in type signatures
387 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
388 --> $DIR/typeck_type_placeholder_item.rs:146:26
390 LL | fn assoc_fn_test1(x: _);
391 | ^ not allowed in type signatures
393 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
394 --> $DIR/typeck_type_placeholder_item.rs:148:26
396 LL | fn assoc_fn_test2(x: _) -> _;
397 | ^ ^ not allowed in type signatures
399 | not allowed in type signatures
401 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
402 --> $DIR/typeck_type_placeholder_item.rs:150:28
404 LL | fn assoc_fn_test3() -> _;
405 | ^ not allowed in type signatures
407 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
408 --> $DIR/typeck_type_placeholder_item.rs:190:14
411 | ^ not allowed in type signatures
413 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
414 --> $DIR/typeck_type_placeholder_item.rs:192:14
417 | ^ not allowed in type signatures
419 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
420 --> $DIR/typeck_type_placeholder_item.rs:194:14
422 LL | const D: _ = 42;
425 | not allowed in type signatures
426 | help: replace `_` with the correct type: `i32`
428 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
429 --> $DIR/typeck_type_placeholder_item.rs:197:26
431 LL | type F: std::ops::Fn(_);
432 | ^ not allowed in type signatures
434 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
435 --> $DIR/typeck_type_placeholder_item.rs:40:24
437 LL | fn test9(&self) -> _ { () }
440 | not allowed in type signatures
441 | help: replace with the correct return type: `()`
443 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
444 --> $DIR/typeck_type_placeholder_item.rs:43:27
446 LL | fn test10(&self, _x : _) { }
447 | ^ not allowed in type signatures
449 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
450 --> $DIR/typeck_type_placeholder_item.rs:58:24
452 LL | fn clone(&self) -> _ { Test9 }
455 | not allowed in type signatures
456 | help: replace with the correct return type: `Test9`
458 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
459 --> $DIR/typeck_type_placeholder_item.rs:61:37
461 LL | fn clone_from(&mut self, other: _) { *self = Test9; }
462 | ^ not allowed in type signatures
464 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
465 --> $DIR/typeck_type_placeholder_item.rs:107:31
467 LL | fn fn_test9(&self) -> _ { () }
470 | not allowed in type signatures
471 | help: replace with the correct return type: `()`
473 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
474 --> $DIR/typeck_type_placeholder_item.rs:110:34
476 LL | fn fn_test10(&self, _x : _) { }
477 | ^ not allowed in type signatures
479 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
480 --> $DIR/typeck_type_placeholder_item.rs:115:28
482 LL | fn clone(&self) -> _ { FnTest9 }
485 | not allowed in type signatures
486 | help: replace with the correct return type: `FnTest9`
488 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
489 --> $DIR/typeck_type_placeholder_item.rs:118:41
491 LL | fn clone_from(&mut self, other: _) { *self = FnTest9; }
492 | ^ not allowed in type signatures
494 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
495 --> $DIR/typeck_type_placeholder_item.rs:201:14
498 | ^ not allowed in type signatures
500 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
501 --> $DIR/typeck_type_placeholder_item.rs:203:14
504 | ^ not allowed in type signatures
506 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
507 --> $DIR/typeck_type_placeholder_item.rs:205:14
510 | ^ not allowed in type signatures
512 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
513 --> $DIR/typeck_type_placeholder_item.rs:208:14
515 LL | const D: _ = 42;
518 | not allowed in type signatures
519 | help: replace `_` with the correct type: `i32`
521 error: aborting due to 67 previous errors
523 Some errors have detailed explanations: E0121, E0282, E0403.
524 For more information about an error, try `rustc --explain E0121`.