blob: 7066e0a211fc6bcb15f27814e48c3dfdb1263df9 [file] [log] [blame]
//@ check-pass
#![feature(impl_trait_in_assoc_type)]
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() {}