]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/issue-58887.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-58887.rs
CommitLineData
60c5eb7d
XL
1// run-pass
2
416331ca
XL
3#![feature(type_alias_impl_trait)]
4
5trait UnwrapItemsExt {
6 type Iter;
7 fn unwrap_items(self) -> Self::Iter;
8}
9
10impl<I, T, E> UnwrapItemsExt for I
11where
12 I: Iterator<Item = Result<T, E>>,
13 E: std::fmt::Debug,
14{
15 type Iter = impl Iterator<Item = T>;
416331ca
XL
16
17 fn unwrap_items(self) -> Self::Iter {
416331ca
XL
18 self.map(|x| x.unwrap())
19 }
20}
21
22fn main() {}