@@ -17,7 +17,7 @@ LL | -> <::std::ops::Range<impl Debug> as Iterator>::Item
17
17
| ^^^^^^^^^^
18
18
19
19
error[E0667]: `impl Trait` is not allowed in path parameters
20
- --> $DIR/impl_trait_projections.rs:42 :29
20
+ --> $DIR/impl_trait_projections.rs:43 :29
21
21
|
22
22
LL | -> <dyn Iterator<Item = impl Debug> as Iterator>::Item
23
23
| ^^^^^^^^^^
@@ -30,7 +30,34 @@ LL | fn projection_is_disallowed(x: impl Iterator) -> <impl Iterator>::Item {
30
30
|
31
31
= note: specify the type using the syntax `<impl std::iter::Iterator as Trait>::Item`
32
32
33
- error: aborting due to 5 previous errors
33
+ error[E0277]: the trait bound `impl std::fmt::Debug: std::iter::Step` is not satisfied
34
+ --> $DIR/impl_trait_projections.rs:38:1
35
+ |
36
+ LL | / { //~ ERROR trait bound `impl std::fmt::Debug: std::iter::Step` is not satisfied
37
+ LL | | (1i32..100).next().unwrap() //~ ERROR mismatched types
38
+ LL | | }
39
+ | |_^ the trait `std::iter::Step` is not implemented for `impl std::fmt::Debug`
40
+ |
41
+ = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::ops::Range<impl std::fmt::Debug>`
42
+
43
+ error[E0308]: mismatched types
44
+ --> $DIR/impl_trait_projections.rs:39:5
45
+ |
46
+ LL | (1i32..100).next().unwrap() //~ ERROR mismatched types
47
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected anonymized type, found i32
48
+ |
49
+ = note: expected type `impl std::fmt::Debug`
50
+ found type `i32`
51
+
52
+ error[E0277]: the trait bound `impl std::fmt::Debug: std::iter::Step` is not satisfied
53
+ --> $DIR/impl_trait_projections.rs:35:8
54
+ |
55
+ LL | -> <::std::ops::Range<impl Debug> as Iterator>::Item
56
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::iter::Step` is not implemented for `impl std::fmt::Debug`
57
+ |
58
+ = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::ops::Range<impl std::fmt::Debug>`
59
+
60
+ error: aborting due to 8 previous errors
34
61
35
- Some errors occurred: E0223, E0667.
62
+ Some errors occurred: E0223, E0277, E0308, E0667.
36
63
For more information about an error, try `rustc --explain E0223`.
0 commit comments