1 // Tests that HRTBs are correctly accepted -- https://github.com/rust-lang/rust/issues/50301
3 // ignore-compare-mode-chalk
6 for<'a> &'a Self::IntoIter: IntoIterator<Item = u32>,
9 fn get(&self) -> Self::IntoIter;
12 struct Impl(Vec<u32>);
15 type IntoIter = ImplIntoIter;
16 fn get(&self) -> Self::IntoIter {
17 ImplIntoIter(self.0.clone())
21 struct ImplIntoIter(Vec<u32>);
23 impl<'a> IntoIterator for &'a ImplIntoIter {
24 type Item = <Self::IntoIter as Iterator>::Item;
25 type IntoIter = std::iter::Cloned<std::slice::Iter<'a, u32>>;
26 fn into_iter(self) -> Self::IntoIter {
27 (&self.0).into_iter().cloned()