rust/src/test/ui/issues/issue-24338.rs
2019-11-04 16:03:46 +01:00

22 lines
338 B
Rust

//
// 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() {}