rust/src/test/ui/issues/issue-22066.rs
2019-07-03 06:30:28 +09:00

13 lines
339 B
Rust

// build-pass (FIXME(62277): could be 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() {}