// Regression test for #48132. This was failing due to problems around // the projection caching and dropck type enumeration. // run-pass #![allow(dead_code)] struct Inner { iterator: I, item: V, } struct Outer { inner: Inner, } fn outer(iterator: I) -> Outer where I: Iterator, I::Item: Default, { Outer { inner: Inner { iterator: iterator, item: Default::default(), } } } fn main() { outer(std::iter::once(&1).cloned()); }