| error[E0271]: type mismatch resolving `for<'a> <<std::vec::Vec<T> as Iterable>::Iter<'a> as std::iter::Iterator>::Item == <std::vec::Vec<T> as Iterable>::Item<'a>` |
| --> $DIR/iterable.rs:20:5 |
| | |
| LL | impl<T> Iterable for Vec<T> { |
| | --------------------------- in this `impl` item |
| LL | type Item<'a> where T: 'a = <std::slice::Iter<'a, T> as Iterator>::Item; |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found associated type |
| | |
| ::: $SRC_DIR/libcore/iter/traits/iterator.rs:LL:COL |
| | |
| LL | type Item; |
| | ---- associated type defined here |
| | |
| = note: expected reference `&T` |
| found associated type `<std::vec::Vec<T> as Iterable>::Item<'_>` |
| = note: consider constraining the associated type `<std::vec::Vec<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> <<[T] as Iterable>::Iter<'a> as std::iter::Iterator>::Item == <[T] as Iterable>::Item<'a>` |
| --> $DIR/iterable.rs:32:5 |
| | |
| LL | impl<T> Iterable for [T] { |
| | ------------------------ in this `impl` item |
| LL | type Item<'a> where T: 'a = <std::slice::Iter<'a, T> as Iterator>::Item; |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found associated type |
| | |
| ::: $SRC_DIR/libcore/iter/traits/iterator.rs:LL:COL |
| | |
| LL | type Item; |
| | ---- associated type defined here |
| | |
| = 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> <<std::vec::Vec<T> as Iterable>::Iter<'a> as std::iter::Iterator>::Item == <std::vec::Vec<T> as Iterable>::Item<'a>` |
| --> $DIR/iterable.rs:24:30 |
| | |
| LL | trait Iterable { |
| | -------------- required by `Iterable` |
| ... |
| LL | fn iter<'a>(&'a self) -> Self::Iter<'a> { |
| | ^^^^^^^^^^^^^^ expected associated type, found reference |
| | |
| = note: expected associated type `<std::vec::Vec<T> as Iterable>::Item<'_>` |
| found reference `&T` |
| = note: consider constraining the associated type `<std::vec::Vec<T> as Iterable>::Item<'_>` to `&_` or calling a method that returns `<std::vec::Vec<T> 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:36:30 |
| | |
| LL | trait Iterable { |
| | -------------- required by `Iterable` |
| ... |
| LL | fn iter<'a>(&'a self) -> Self::Iter<'a> { |
| | ^^^^^^^^^^^^^^ 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`. |