about summary refs log tree commit diff
path: root/tests/ui/wf/hir-wf-check-erase-regions.rs
blob: ef9132697efc8f85f43d748222c1cf63bba7e20a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Regression test for #87549.
//@ incremental

//@ ignore-compare-mode-polonius (explicit revisions)
//@ revisions: nll polonius
//@ [polonius] compile-flags: -Zpolonius=next

pub struct Table<T, const N: usize>([Option<T>; N]);

impl<'a, T, const N: usize> IntoIterator for &'a Table<T, N> {
    type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>; //~ ERROR `&'a T` is not an iterator
    //~^ ERROR `&'a T` is not an iterator
    type Item = &'a T;

    fn into_iter(self) -> Self::IntoIter {
        //~^ ERROR `&'a T` is not an iterator
        //[nll]~| ERROR `&T` is not an iterator
        unimplemented!()
    }
}
fn main() {}