summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/issue-99387.rs
blob: 616eb935e93d47d5454041c74e4aa08b8286caa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// check-pass

#![feature(type_alias_impl_trait)]
#![allow(private_in_public)]

pub type Successors<'a> = impl Iterator<Item = &'a ()>;

pub fn f<'a>() -> Successors<'a> {
    None.into_iter()
}

trait Tr {
    type Item;
}

impl<'a> Tr for &'a () {
    type Item = Successors<'a>;
}

pub fn ohno<'a>() -> <&'a () as Tr>::Item {
    None.into_iter()
}

fn main() {}