rust/src/test/ui/issues/issue-24338.rs

22 lines
340 B
Rust
Raw Normal View History

2018-10-04 14:50:01 -05:00
//
// compile-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() {}