]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-48132.rs
Auto merge of #57108 - Mark-Simulacrum:license-remove, r=pietroalbini
[rust.git] / src / test / ui / issues / issue-48132.rs
1 // Regression test for #48132. This was failing due to problems around
2 // the projection caching and dropck type enumeration.
3
4 // run-pass
5
6 #![feature(nll)]
7 #![allow(warnings)]
8
9 struct Inner<I, V> {
10     iterator: I,
11     item: V,
12 }
13
14 struct Outer<I: Iterator> {
15     inner: Inner<I, I::Item>,
16 }
17
18 fn outer<I>(iterator: I) -> Outer<I>
19 where I: Iterator,
20       I::Item: Default,
21 {
22     Outer {
23         inner: Inner {
24             iterator: iterator,
25             item: Default::default(),
26         }
27     }
28 }
29
30 fn main() {
31     outer(std::iter::once(&1).cloned());
32 }