]> git.lizzy.rs Git - rust.git/blob - src/test/ui/existential-type/issue-58887.rs
Auto merge of #63089 - kennytm:use-try-run-for-linkchecker, r=Mark-Simulacrum
[rust.git] / src / test / ui / existential-type / issue-58887.rs
1 #![feature(existential_type)]
2
3 trait UnwrapItemsExt {
4     type Iter;
5     fn unwrap_items(self) -> Self::Iter;
6 }
7
8 impl<I, T, E> UnwrapItemsExt for I
9 where
10     I: Iterator<Item = Result<T, E>>,
11     E: std::fmt::Debug,
12 {
13     existential type Iter: Iterator<Item = T>;
14     //~^ ERROR: could not find defining uses
15
16     fn unwrap_items(self) -> Self::Iter {
17     //~^ ERROR: type parameter `T` is part of concrete type
18     //~| ERROR: type parameter `E` is part of concrete type
19         self.map(|x| x.unwrap())
20     }
21 }
22
23 fn main() {}