about summary refs log tree commit diff
path: root/tests/ui/associated-types/issue-22066.rs
blob: 6c8339b9c092a10bfa46f60af1e55696d41b56dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ check-pass
pub trait LineFormatter<'a> {
    type Iter: Iterator<Item=&'a str> + 'a;
    fn iter(&'a self, line: &'a str) -> Self::Iter;

    fn dimensions(&'a self, line: &'a str) {
        let iter: Self::Iter = self.iter(line);
        <_ as IntoIterator>::into_iter(iter);
    }
}

fn main() {}