error[E0271]: type mismatch resolving `for<'a> < as Iterable>::Iter<'a> as std::iter::Iterator>::Item == as Iterable>::Item<'a>` --> $DIR/iterable.rs:15:5 | LL | impl Iterable for Vec { | --------------------------- in this `impl` item LL | type Item<'a> where T: 'a = as Iterator>::Item; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found associated type | = note: expected reference `&T` found associated type ` as Iterable>::Item<'_>` = note: consider constraining the associated type ` as Iterable>::Item<'_>` to `&_` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html error[E0271]: type mismatch resolving `for<'a> <<[T] as Iterable>::Iter<'a> as std::iter::Iterator>::Item == <[T] as Iterable>::Item<'a>` --> $DIR/iterable.rs:27:5 | LL | impl Iterable for [T] { | ------------------------ in this `impl` item LL | type Item<'a> where T: 'a = as Iterator>::Item; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found associated type | = note: expected reference `&T` found associated type `<[T] as Iterable>::Item<'_>` = note: consider constraining the associated type `<[T] as Iterable>::Item<'_>` to `&_` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html error[E0271]: type mismatch resolving `for<'a> < as Iterable>::Iter<'a> as std::iter::Iterator>::Item == as Iterable>::Item<'a>` --> $DIR/iterable.rs:19:5 | LL | trait Iterable { | -------------- required by `Iterable` ... LL | / fn iter<'a>(&'a self) -> Self::Iter<'a> { LL | | LL | | self.iter() LL | | } | |_____^ expected associated type, found reference | = note: expected associated type ` as Iterable>::Item<'_>` found reference `&T` = note: consider constraining the associated type ` as Iterable>::Item<'_>` to `&_` or calling a method that returns ` as Iterable>::Item<'_>` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html error[E0271]: type mismatch resolving `for<'a> <<[T] as Iterable>::Iter<'a> as std::iter::Iterator>::Item == <[T] as Iterable>::Item<'a>` --> $DIR/iterable.rs:31:5 | LL | trait Iterable { | -------------- required by `Iterable` ... LL | / fn iter<'a>(&'a self) -> Self::Iter<'a> { LL | | LL | | self.iter() LL | | } | |_____^ expected associated type, found reference | = note: expected associated type `<[T] as Iterable>::Item<'_>` found reference `&T` = note: consider constraining the associated type `<[T] as Iterable>::Item<'_>` to `&_` or calling a method that returns `<[T] as Iterable>::Item<'_>` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0271`.