summaryrefslogtreecommitdiffstats
path: root/tests/ui/generic-associated-types/issue-86218-2.rs
blob: 63c839ea8712d798e0c82fa66ae41fbb13cfa866 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// check-pass

#![feature(type_alias_impl_trait)]

pub trait Stream {
    type Item;
}

impl Stream for () {
    type Item = i32;
}

trait Yay<AdditionalValue> {
    type InnerStream<'s>: Stream<Item = i32> + 's;
    fn foo<'s>() -> Self::InnerStream<'s>;
}

impl<T> Yay<T> for () {
    type InnerStream<'s> = impl Stream<Item = i32> + 's;
    fn foo<'s>() -> Self::InnerStream<'s> { () }
}

fn main() {}