summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/issue-24338.rs
blob: 3a2c790f85203183ee697f49a93dc93e71ace427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//
// check-pass

trait DictLike<'a> {
    type ItemsIterator: Iterator<Item=u8>;
    fn get(c: Self::ItemsIterator) {
        c.into_iter();
    }
}

trait DictLike2<'a> {
    type ItemsIterator: Iterator<Item=u8>;

    fn items(&self) -> Self::ItemsIterator;

    fn get(&self)  {
        for _ in self.items() {}
    }
}

fn main() {}