// Issue #5886: a complex instance of issue #2687.
trait Iterator {
fn next(&mut self) -> Option;
}
trait IteratorUtil: Sized
{
fn zip>(self, other: U) -> ZipIterator;
}
impl> IteratorUtil for T {
fn zip>(self, other: U) -> ZipIterator {
//~^ ERROR E0276
ZipIterator{a: self, b: other}
}
}
struct ZipIterator {
a: T, b: U
}
fn main() {}