// check-pass #![allow(dead_code)] struct Foo(T); struct IntoIter(T); impl<'a, T: 'a> Iterator for IntoIter { type Item = (); fn next(&mut self) -> Option<()> { None } } impl IntoIterator for Foo { type Item = (); type IntoIter = IntoIter; fn into_iter(self) -> IntoIter { IntoIter(self.0) } } fn main() {}