1 // Tests that HRTBs are correctly accepted -- https://github.com/rust-lang/rust/issues/50301
5 for<'a> &'a Self::IntoIter: IntoIterator<Item = u32>,
8 fn get(&self) -> Self::IntoIter;
11 struct Impl(Vec<u32>);
14 type IntoIter = ImplIntoIter;
15 fn get(&self) -> Self::IntoIter {
16 ImplIntoIter(self.0.clone())
20 struct ImplIntoIter(Vec<u32>);
22 impl<'a> IntoIterator for &'a ImplIntoIter {
23 type Item = <Self::IntoIter as Iterator>::Item;
24 type IntoIter = std::iter::Cloned<std::slice::Iter<'a, u32>>;
25 fn into_iter(self) -> Self::IntoIter {
26 (&self.0).into_iter().cloned()