]>
Commit | Line | Data |
---|---|---|
74b04a01 | 1 | error: expected identifier, found reserved identifier `_` |
94222f64 | 2 | --> $DIR/typeck_type_placeholder_item.rs:154:18 |
74b04a01 XL |
3 | | |
4 | LL | struct BadStruct<_>(_); | |
5 | | ^ expected identifier, found reserved identifier | |
6 | ||
7 | error: expected identifier, found reserved identifier `_` | |
94222f64 | 8 | --> $DIR/typeck_type_placeholder_item.rs:157:16 |
74b04a01 XL |
9 | | |
10 | LL | trait BadTrait<_> {} | |
11 | | ^ expected identifier, found reserved identifier | |
12 | ||
13 | error: expected identifier, found reserved identifier `_` | |
94222f64 | 14 | --> $DIR/typeck_type_placeholder_item.rs:167:19 |
74b04a01 XL |
15 | | |
16 | LL | struct BadStruct1<_, _>(_); | |
17 | | ^ expected identifier, found reserved identifier | |
18 | ||
19 | error: expected identifier, found reserved identifier `_` | |
94222f64 | 20 | --> $DIR/typeck_type_placeholder_item.rs:167:22 |
74b04a01 XL |
21 | | |
22 | LL | struct BadStruct1<_, _>(_); | |
23 | | ^ expected identifier, found reserved identifier | |
24 | ||
25 | error: expected identifier, found reserved identifier `_` | |
94222f64 | 26 | --> $DIR/typeck_type_placeholder_item.rs:172:19 |
74b04a01 XL |
27 | | |
28 | LL | struct BadStruct2<_, T>(_, T); | |
29 | | ^ expected identifier, found reserved identifier | |
30 | ||
31 | error: associated constant in `impl` without body | |
94222f64 | 32 | --> $DIR/typeck_type_placeholder_item.rs:205:5 |
74b04a01 XL |
33 | | |
34 | LL | const C: _; | |
35 | | ^^^^^^^^^^- | |
36 | | | | |
37 | | help: provide a definition for the constant: `= <expr>;` | |
38 | ||
39 | error[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 | | |
42 | LL | struct BadStruct1<_, _>(_); | |
43 | | - ^ already used | |
44 | | | | |
45 | | first use of `_` | |
46 | ||
5099ac24 | 47 | error[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 | | |
50 | LL | fn test() -> _ { 5 } | |
51 | | ^ | |
52 | | | | |
53 | | not allowed in type signatures | |
54 | | help: replace with the correct return type: `i32` | |
55 | ||
5099ac24 | 56 | error[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 | | |
59 | LL | 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 | 66 | error[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 | | |
69 | LL | static TEST3: _ = "test"; | |
70 | | ^ | |
71 | | | | |
72 | | not allowed in type signatures | |
17df50a5 | 73 | | help: replace with the correct type: `&str` |
74b04a01 | 74 | |
5099ac24 | 75 | error[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 | | |
78 | LL | static TEST4: _ = 145; | |
79 | | ^ | |
80 | | | | |
81 | | not allowed in type signatures | |
17df50a5 | 82 | | help: replace with the correct type: `i32` |
74b04a01 | 83 | |
5099ac24 | 84 | error[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 | | |
87 | LL | static TEST5: (_, _) = (1, 2); | |
88 | | ^^^^^^ not allowed in type signatures | |
89 | ||
5099ac24 | 90 | error[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 | | |
93 | LL | fn test6(_: _) { } | |
94 | | ^ not allowed in type signatures | |
95 | | | |
96 | help: use type parameters instead | |
97 | | | |
98 | LL | fn test6<T>(_: T) { } | |
94222f64 | 99 | | +++ ~ |
74b04a01 | 100 | |
5099ac24 | 101 | error[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 | | |
104 | LL | fn test6_b<T>(_: _, _: T) { } | |
105 | | ^ not allowed in type signatures | |
106 | | | |
107 | help: use type parameters instead | |
108 | | | |
ba9703b0 | 109 | LL | fn test6_b<T, U>(_: U, _: T) { } |
94222f64 | 110 | | +++ ~ |
74b04a01 | 111 | |
5099ac24 | 112 | error[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 | | |
115 | LL | fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { } | |
116 | | ^ not allowed in type signatures | |
117 | | | |
118 | help: use type parameters instead | |
119 | | | |
ba9703b0 | 120 | LL | fn test6_c<T, K, L, A, B, U>(_: U, _: (T, K, L, A, B)) { } |
94222f64 | 121 | | +++ ~ |
74b04a01 | 122 | |
5099ac24 | 123 | error[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 | | |
126 | LL | fn test7(x: _) { let _x: usize = x; } | |
127 | | ^ not allowed in type signatures | |
128 | | | |
129 | help: use type parameters instead | |
130 | | | |
131 | LL | fn test7<T>(x: T) { let _x: usize = x; } | |
94222f64 | 132 | | +++ ~ |
74b04a01 | 133 | |
5099ac24 | 134 | error[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 | | |
137 | LL | fn test8(_f: fn() -> _) { } | |
138 | | ^ | |
139 | | | | |
140 | | not allowed in type signatures | |
141 | | help: use type parameters instead: `T` | |
142 | ||
5099ac24 | 143 | error[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 | | |
146 | LL | fn test8(_f: fn() -> _) { } | |
147 | | ^ not allowed in type signatures | |
148 | | | |
149 | help: use type parameters instead | |
150 | | | |
151 | LL | fn test8<T>(_f: fn() -> T) { } | |
94222f64 | 152 | | +++ ~ |
74b04a01 | 153 | |
5099ac24 | 154 | error[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 | | |
157 | LL | 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 | 163 | error[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 | | |
166 | LL | 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 | 172 | error[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 | | |
175 | LL | a: _, | |
176 | | ^ not allowed in type signatures | |
177 | LL | | |
178 | LL | b: (_, _), | |
179 | | ^ ^ not allowed in type signatures | |
180 | | | | |
181 | | not allowed in type signatures | |
182 | | | |
183 | help: use type parameters instead | |
184 | | | |
94222f64 XL |
185 | LL ~ struct Test10<T> { |
186 | LL ~ a: T, | |
74b04a01 | 187 | LL | |
94222f64 | 188 | LL ~ b: (T, T), |
74b04a01 XL |
189 | | |
190 | ||
191 | error: missing type for `static` item | |
f2b60f7d | 192 | --> $DIR/typeck_type_placeholder_item.rs:73:13 |
74b04a01 XL |
193 | | |
194 | LL | static A = 42; | |
f2b60f7d | 195 | | ^ help: provide a type for the static variable: `: i32` |
74b04a01 | 196 | |
5099ac24 | 197 | error[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 | | |
200 | LL | static B: _ = 42; | |
201 | | ^ | |
202 | | | | |
203 | | not allowed in type signatures | |
17df50a5 | 204 | | help: replace with the correct type: `i32` |
74b04a01 | 205 | |
5099ac24 | 206 | error[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 | | |
209 | LL | static C: Option<_> = Some(42); | |
210 | | ^^^^^^^^^ not allowed in type signatures | |
211 | ||
5099ac24 | 212 | error[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 | | |
215 | LL | fn fn_test() -> _ { 5 } | |
216 | | ^ | |
217 | | | | |
218 | | not allowed in type signatures | |
219 | | help: replace with the correct return type: `i32` | |
220 | ||
5099ac24 | 221 | error[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 | | |
224 | LL | 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 | 231 | error[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 | | |
234 | LL | static FN_TEST3: _ = "test"; | |
235 | | ^ | |
236 | | | | |
237 | | not allowed in type signatures | |
17df50a5 | 238 | | help: replace with the correct type: `&str` |
74b04a01 | 239 | |
5099ac24 | 240 | error[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 | | |
243 | LL | static FN_TEST4: _ = 145; | |
244 | | ^ | |
245 | | | | |
246 | | not allowed in type signatures | |
17df50a5 | 247 | | help: replace with the correct type: `i32` |
74b04a01 | 248 | |
5099ac24 | 249 | error[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 | | |
252 | LL | static FN_TEST5: (_, _) = (1, 2); | |
253 | | ^^^^^^ not allowed in type signatures | |
254 | ||
5099ac24 | 255 | error[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 | | |
258 | LL | fn fn_test6(_: _) { } | |
259 | | ^ not allowed in type signatures | |
260 | | | |
261 | help: use type parameters instead | |
262 | | | |
263 | LL | fn fn_test6<T>(_: T) { } | |
94222f64 | 264 | | +++ ~ |
74b04a01 | 265 | |
5099ac24 | 266 | error[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 | | |
269 | LL | fn fn_test7(x: _) { let _x: usize = x; } | |
270 | | ^ not allowed in type signatures | |
271 | | | |
272 | help: use type parameters instead | |
273 | | | |
274 | LL | fn fn_test7<T>(x: T) { let _x: usize = x; } | |
94222f64 | 275 | | +++ ~ |
74b04a01 | 276 | |
5099ac24 | 277 | error[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 | | |
280 | LL | fn fn_test8(_f: fn() -> _) { } | |
281 | | ^ | |
282 | | | | |
283 | | not allowed in type signatures | |
284 | | help: use type parameters instead: `T` | |
285 | ||
5099ac24 | 286 | error[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 | | |
289 | LL | fn fn_test8(_f: fn() -> _) { } | |
290 | | ^ not allowed in type signatures | |
291 | | | |
292 | help: use type parameters instead | |
293 | | | |
294 | LL | fn fn_test8<T>(_f: fn() -> T) { } | |
94222f64 | 295 | | +++ ~ |
74b04a01 | 296 | |
5099ac24 | 297 | error[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 | | |
300 | LL | a: _, | |
301 | | ^ not allowed in type signatures | |
302 | LL | | |
303 | LL | b: (_, _), | |
304 | | ^ ^ not allowed in type signatures | |
305 | | | | |
306 | | not allowed in type signatures | |
307 | | | |
308 | help: use type parameters instead | |
309 | | | |
94222f64 XL |
310 | LL ~ struct FnTest10<T> { |
311 | LL ~ a: T, | |
74b04a01 | 312 | LL | |
94222f64 | 313 | LL ~ b: (T, T), |
74b04a01 XL |
314 | | |
315 | ||
316 | error[E0282]: type annotations needed | |
94222f64 | 317 | --> $DIR/typeck_type_placeholder_item.rs:128:18 |
74b04a01 XL |
318 | | |
319 | LL | fn fn_test11(_: _) -> (_, _) { panic!() } | |
320 | | ^ cannot infer type | |
321 | ||
5099ac24 | 322 | error[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 | | |
325 | LL | fn fn_test11(_: _) -> (_, _) { panic!() } | |
326 | | ^ ^ not allowed in type signatures | |
327 | | | | |
328 | | not allowed in type signatures | |
329 | ||
5099ac24 | 330 | error[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 | | |
333 | LL | 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 | 340 | error[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 | | |
343 | LL | 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 | 349 | error[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 | | |
352 | LL | struct BadStruct<_>(_); | |
353 | | ^ not allowed in type signatures | |
354 | | | |
355 | help: use type parameters instead | |
356 | | | |
357 | LL | struct BadStruct<T>(T); | |
94222f64 | 358 | | ~ ~ |
74b04a01 | 359 | |
5099ac24 | 360 | error[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 | | |
363 | LL | impl BadTrait<_> for BadStruct<_> {} | |
364 | | ^ ^ not allowed in type signatures | |
365 | | | | |
366 | | not allowed in type signatures | |
367 | | | |
368 | help: use type parameters instead | |
369 | | | |
370 | LL | impl<T> BadTrait<T> for BadStruct<T> {} | |
94222f64 | 371 | | +++ ~ ~ |
74b04a01 | 372 | |
5099ac24 | 373 | error[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 | | |
376 | LL | fn impl_trait() -> impl BadTrait<_> { | |
377 | | ^ not allowed in type signatures | |
378 | ||
5099ac24 | 379 | error[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 | | |
382 | LL | struct BadStruct1<_, _>(_); | |
383 | | ^ not allowed in type signatures | |
384 | | | |
385 | help: use type parameters instead | |
386 | | | |
387 | LL | struct BadStruct1<T, _>(T); | |
94222f64 | 388 | | ~ ~ |
74b04a01 | 389 | |
5099ac24 | 390 | error[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 | | |
393 | LL | struct BadStruct2<_, T>(_, T); | |
394 | | ^ not allowed in type signatures | |
395 | | | |
396 | help: use type parameters instead | |
397 | | | |
ba9703b0 | 398 | LL | struct BadStruct2<U, T>(U, T); |
94222f64 | 399 | | ~ ~ |
74b04a01 | 400 | |
5099ac24 | 401 | error[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 | | |
404 | LL | type X = Box<_>; | |
405 | | ^ not allowed in type signatures | |
406 | ||
5099ac24 | 407 | error[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 |
410 | LL | type Y = impl Trait<_>; |
411 | | ^ not allowed in type signatures | |
74b04a01 | 412 | |
5099ac24 | 413 | error[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 | | |
416 | LL | 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 | 422 | error[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 | | |
425 | LL | 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 |
431 | error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types |
432 | --> $DIR/typeck_type_placeholder_item.rs:224:31 | |
433 | | | |
434 | LL | 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 |
440 | error[E0277]: the trait bound `std::ops::Range<{integer}>: Iterator` is not satisfied |
441 | --> $DIR/typeck_type_placeholder_item.rs:229:22 | |
9c376795 FG |
442 | | |
443 | LL | 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}>` | |
447 | note: 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 | | | |
450 | LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x); | |
451 | | ^^^^^^^ | |
452 | ||
453 | error[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 |
456 | LL | 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]>` | |
460 | note: 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 | | | |
463 | LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x); | |
9ffffee4 FG |
464 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
465 | ||
466 | error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants | |
467 | --> $DIR/typeck_type_placeholder_item.rs:229:10 | |
468 | | | |
469 | LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x); | |
470 | | ^ not allowed in type signatures | |
9c376795 | 471 | |
5099ac24 | 472 | error[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 | | |
475 | LL | fn method_test1(&self, x: _); | |
476 | | ^ not allowed in type signatures | |
477 | | | |
478 | help: use type parameters instead | |
479 | | | |
480 | LL | fn method_test1<T>(&self, x: T); | |
94222f64 | 481 | | +++ ~ |
74b04a01 | 482 | |
5099ac24 | 483 | error[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 | | |
486 | LL | fn method_test2(&self, x: _) -> _; | |
487 | | ^ ^ not allowed in type signatures | |
488 | | | | |
489 | | not allowed in type signatures | |
490 | | | |
491 | help: use type parameters instead | |
492 | | | |
493 | LL | fn method_test2<T>(&self, x: T) -> T; | |
94222f64 | 494 | | +++ ~ ~ |
74b04a01 | 495 | |
5099ac24 | 496 | error[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 | | |
499 | LL | fn method_test3(&self) -> _; | |
500 | | ^ not allowed in type signatures | |
501 | | | |
502 | help: use type parameters instead | |
503 | | | |
504 | LL | fn method_test3<T>(&self) -> T; | |
94222f64 | 505 | | +++ ~ |
74b04a01 | 506 | |
5099ac24 | 507 | error[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 | | |
510 | LL | fn assoc_fn_test1(x: _); | |
511 | | ^ not allowed in type signatures | |
512 | | | |
513 | help: use type parameters instead | |
514 | | | |
515 | LL | fn assoc_fn_test1<T>(x: T); | |
94222f64 | 516 | | +++ ~ |
74b04a01 | 517 | |
5099ac24 | 518 | error[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 | | |
521 | LL | fn assoc_fn_test2(x: _) -> _; | |
522 | | ^ ^ not allowed in type signatures | |
523 | | | | |
524 | | not allowed in type signatures | |
525 | | | |
526 | help: use type parameters instead | |
527 | | | |
528 | LL | fn assoc_fn_test2<T>(x: T) -> T; | |
94222f64 | 529 | | +++ ~ ~ |
74b04a01 | 530 | |
5099ac24 | 531 | error[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 | | |
534 | LL | fn assoc_fn_test3() -> _; | |
535 | | ^ not allowed in type signatures | |
536 | | | |
537 | help: use type parameters instead | |
538 | | | |
539 | LL | fn assoc_fn_test3<T>() -> T; | |
94222f64 | 540 | | +++ ~ |
74b04a01 | 541 | |
5099ac24 | 542 | error[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 | | |
545 | LL | type B = _; | |
546 | | ^ not allowed in type signatures | |
547 | ||
5099ac24 | 548 | error[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 | | |
551 | LL | const C: _; | |
552 | | ^ not allowed in type signatures | |
553 | ||
5099ac24 | 554 | error[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 | | |
557 | LL | const D: _ = 42; | |
558 | | ^ | |
559 | | | | |
560 | | not allowed in type signatures | |
17df50a5 | 561 | | help: replace with the correct type: `i32` |
74b04a01 | 562 | |
5099ac24 | 563 | error[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 | | |
566 | LL | type F: std::ops::Fn(_); | |
567 | | ^ not allowed in type signatures | |
568 | ||
5099ac24 | 569 | error[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 | | |
572 | LL | fn test9(&self) -> _ { () } | |
573 | | ^ | |
574 | | | | |
575 | | not allowed in type signatures | |
576 | | help: replace with the correct return type: `()` | |
577 | ||
5099ac24 | 578 | error[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 | | |
581 | LL | fn test10(&self, _x : _) { } | |
582 | | ^ not allowed in type signatures | |
583 | | | |
584 | help: use type parameters instead | |
585 | | | |
586 | LL | fn test10<T>(&self, _x : T) { } | |
94222f64 | 587 | | +++ ~ |
1b1a35ee | 588 | |
04454e1e | 589 | error[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 | | |
592 | LL | fn clone(&self) -> _ { Test9 } | |
04454e1e FG |
593 | | ^ not allowed in type signatures |
594 | | | |
595 | help: try replacing `_` with the type in the corresponding trait method signature | |
596 | | | |
597 | LL | fn clone(&self) -> Test9 { Test9 } | |
598 | | ~~~~~ | |
74b04a01 | 599 | |
5099ac24 | 600 | error[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 | | |
603 | LL | fn clone_from(&mut self, other: _) { *self = Test9; } | |
604 | | ^ not allowed in type signatures | |
605 | | | |
04454e1e | 606 | help: try replacing `_` with the type in the corresponding trait method signature |
1b1a35ee | 607 | | |
04454e1e FG |
608 | LL | fn clone_from(&mut self, other: &Test9) { *self = Test9; } |
609 | | ~~~~~~ | |
1b1a35ee | 610 | |
5099ac24 | 611 | error[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 | | |
614 | LL | fn fn_test9(&self) -> _ { () } | |
615 | | ^ | |
616 | | | | |
617 | | not allowed in type signatures | |
618 | | help: replace with the correct return type: `()` | |
619 | ||
5099ac24 | 620 | error[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 | | |
623 | LL | fn fn_test10(&self, _x : _) { } | |
624 | | ^ not allowed in type signatures | |
625 | | | |
626 | help: use type parameters instead | |
627 | | | |
628 | LL | fn fn_test10<T>(&self, _x : T) { } | |
94222f64 | 629 | | +++ ~ |
1b1a35ee | 630 | |
04454e1e | 631 | error[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 | | |
634 | LL | fn clone(&self) -> _ { FnTest9 } | |
04454e1e FG |
635 | | ^ not allowed in type signatures |
636 | | | |
637 | help: try replacing `_` with the type in the corresponding trait method signature | |
638 | | | |
639 | LL | fn clone(&self) -> FnTest9 { FnTest9 } | |
640 | | ~~~~~~~ | |
1b1a35ee | 641 | |
5099ac24 | 642 | error[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 | | |
645 | LL | fn clone_from(&mut self, other: _) { *self = FnTest9; } | |
646 | | ^ not allowed in type signatures | |
647 | | | |
04454e1e | 648 | help: try replacing `_` with the type in the corresponding trait method signature |
1b1a35ee | 649 | | |
04454e1e FG |
650 | LL | fn clone_from(&mut self, other: &FnTest9) { *self = FnTest9; } |
651 | | ~~~~~~~~ | |
74b04a01 | 652 | |
5099ac24 | 653 | error[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 | | |
656 | LL | type A = _; | |
657 | | ^ not allowed in type signatures | |
658 | ||
5099ac24 | 659 | error[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 | | |
662 | LL | type B = _; | |
663 | | ^ not allowed in type signatures | |
664 | ||
5099ac24 | 665 | error[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 | | |
668 | LL | const C: _; | |
669 | | ^ not allowed in type signatures | |
670 | ||
5099ac24 | 671 | error[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 | | |
674 | LL | const D: _ = 42; | |
675 | | ^ | |
676 | | | | |
677 | | not allowed in type signatures | |
17df50a5 | 678 | | help: replace with the correct type: `i32` |
74b04a01 | 679 | |
9ffffee4 | 680 | error: aborting due to 73 previous errors |
74b04a01 | 681 | |
9ffffee4 | 682 | Some errors have detailed explanations: E0121, E0277, E0282, E0403. |
74b04a01 | 683 | For more information about an error, try `rustc --explain E0121`. |