]>
Commit | Line | Data |
---|---|---|
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 | |
8 | trait UnwrapItemsExt { | |
9 | type Iter; | |
10 | fn unwrap_items(self) -> Self::Iter; | |
11 | } | |
12 | ||
13 | impl<I, T, E> UnwrapItemsExt for I | |
14 | where | |
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 | ||
25 | fn main() {} |