1 // Regression test for #48132. This was failing due to problems around
2 // the projection caching and dropck type enumeration.
6 pub struct Container<T: Iterator> {
7 value: Option<T::Item>,
10 impl<T: Iterator> Container<T> {
11 pub fn new(iter: T) -> Self {
16 pub struct Wrapper<'a> {
20 impl<'a, 'de> Wrapper<'a> {
21 pub fn new(content: &'a Content) -> Self {
30 fn crash_it(content: Content) {
31 let items = vec![content];
32 let map = items.iter().map(|ref o| Wrapper::new(o));
34 let mut map_visitor = Container::new(map);