@@ -17,7 +17,7 @@ LL | -> <::std::ops::Range<impl Debug> as Iterator>::Item
1717 | ^^^^^^^^^^
1818
1919error[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
2121 |
2222LL | -> <dyn Iterator<Item = impl Debug> as Iterator>::Item
2323 | ^^^^^^^^^^
@@ -30,7 +30,34 @@ LL | fn projection_is_disallowed(x: impl Iterator) -> <impl Iterator>::Item {
3030 |
3131 = note: specify the type using the syntax `<impl std::iter::Iterator as Trait>::Item`
3232
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
3461
35- Some errors occurred: E0223, E0667.
62+ Some errors occurred: E0223, E0277, E0308, E0667.
3663For more information about an error, try `rustc --explain E0223`.
0 commit comments