//@ check-pass trait Data { type Elem; } impl> Data for ArrayBase { type Elem = F; } struct DatasetIter<'a, R: Data> { data: &'a R::Elem, } pub struct ArrayBase { data: S, } trait Trait { type Item; fn next() -> Option; } impl<'a, D: Data> Trait for DatasetIter<'a, ArrayBase> { type Item = (); fn next() -> Option { None } } fn main() {}