2018-09-30 14:27:26 +02:00
|
|
|
// compile-pass
|
2017-05-03 13:07:30 -04:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-30 02:25:40 +08:00
|
|
|
fn main() {}
|