summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/issue-22066.rs
blob: 8e8ba5dc46c9a29b7e17e589dc8cf93b153c220e (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() {}