]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/issue-58887.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-58887.rs
CommitLineData
60c5eb7d
XL
1// run-pass
2
6a06907d
XL
3// revisions: min_tait full_tait
4#![feature(min_type_alias_impl_trait)]
5#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
6//[full_tait]~^ WARN incomplete
416331ca
XL
7
8trait UnwrapItemsExt {
9 type Iter;
10 fn unwrap_items(self) -> Self::Iter;
11}
12
13impl<I, T, E> UnwrapItemsExt for I
14where
15 I: Iterator<Item = Result<T, E>>,
16 E: std::fmt::Debug,
17{
18 type Iter = impl Iterator<Item = T>;
416331ca
XL
19
20 fn unwrap_items(self) -> Self::Iter {
416331ca
XL
21 self.map(|x| x.unwrap())
22 }
23}
24
25fn main() {}