You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| help: replace with an appropriate return type: `impl Iterator<Item = usize>`
439
439
440
-
error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
441
-
--> $DIR/typeck_type_placeholder_item.rs:229:10
440
+
error[E0277]: the trait bound `std::ops::Range<{integer}>: Iterator` is not satisfied
441
+
--> $DIR/typeck_type_placeholder_item.rs:229:22
442
442
|
443
443
LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
444
-
| ^ not allowed in type signatures
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
445
455
|
446
-
note: however, the inferred type `Map<Filter<Range<i32>, [closure@typeck_type_placeholder_item.rs:229:29]>, [closure@typeck_type_placeholder_item.rs:229:49]>` cannot be named
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`
447
461
--> $DIR/typeck_type_placeholder_item.rs:229:14
448
462
|
449
463
LL | const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
450
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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
451
471
452
472
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
453
473
--> $DIR/typeck_type_placeholder_item.rs:140:31
@@ -657,7 +677,7 @@ LL | const D: _ = 42;
657
677
| not allowed in type signatures
658
678
| help: replace with the correct type: `i32`
659
679
660
-
error: aborting due to 71 previous errors
680
+
error: aborting due to 73 previous errors
661
681
662
-
Some errors have detailed explanations: E0121, E0282, E0403.
682
+
Some errors have detailed explanations: E0121, E0277, E0282, E0403.
663
683
For more information about an error, try `rustc --explain E0121`.
0 commit comments