1 error[E0277]: `&T` is not an iterator
2 --> $DIR/hir-wf-check-erase-regions.rs:7:21
4 LL | type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&T` is not an iterator
7 = help: the trait `Iterator` is not implemented for `&T`
8 = help: the trait `Iterator` is implemented for `&mut I`
9 = note: required for `&T` to implement `IntoIterator`
10 note: required by a bound in `Flatten`
11 --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
13 LL | pub struct Flatten<I: Iterator<Item: IntoIterator>> {
14 | ^^^^^^^^^^^^ required by this bound in `Flatten`
16 error[E0277]: `&T` is not an iterator
17 --> $DIR/hir-wf-check-erase-regions.rs:10:27
19 LL | fn into_iter(self) -> Self::IntoIter {
20 | ^^^^^^^^^^^^^^ `&T` is not an iterator
22 = help: the trait `Iterator` is not implemented for `&T`
23 = help: the trait `Iterator` is implemented for `&mut I`
24 = note: required for `&T` to implement `IntoIterator`
25 note: required by a bound in `Flatten`
26 --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
28 LL | pub struct Flatten<I: Iterator<Item: IntoIterator>> {
29 | ^^^^^^^^^^^^ required by this bound in `Flatten`
31 error: aborting due to 2 previous errors
33 For more information about this error, try `rustc --explain E0277`.