// run-pass #![feature(impl_trait_in_assoc_type)] trait UnwrapItemsExt { type Iter; fn unwrap_items(self) -> Self::Iter; } impl UnwrapItemsExt for I where I: Iterator>, E: std::fmt::Debug, { type Iter = impl Iterator; fn unwrap_items(self) -> Self::Iter { self.map(|x| x.unwrap()) } } fn main() {}