]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-70121.rs
Loop over all opaque types instead of looking at just the first one with the same...
[rust.git] / src / test / ui / type-alias-impl-trait / issue-70121.rs
1 // check-pass
2
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
7
8 pub type Successors<'a> = impl Iterator<Item = &'a ()>;
9
10 pub fn f<'a>() -> Successors<'a> {
11     None.into_iter()
12 }
13
14 pub trait Tr {
15     type Item;
16 }
17
18 impl<'a> Tr for &'a () {
19     type Item = Successors<'a>;
20 }
21
22 pub fn kazusa<'a>() -> <&'a () as Tr>::Item {
23     None.into_iter()
24 }
25
26 fn main() {}