]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/bugs/issue-86218.rs
Rollup merge of #93613 - crlf0710:rename_to_async_iter, r=yaahc
[rust.git] / src / test / ui / generic-associated-types / bugs / issue-86218.rs
1 // check-fail
2
3 // This should pass, but seems to run into a TAIT issue.
4
5 #![feature(generic_associated_types)]
6 #![feature(type_alias_impl_trait)]
7
8 pub trait Stream {
9     type Item;
10 }
11
12 impl Stream for () {
13     type Item = i32;
14 }
15
16 trait Yay<AdditionalValue> {
17     type InnerStream<'s>: Stream<Item = i32> + 's;
18     fn foo<'s>() -> Self::InnerStream<'s>;
19 }
20
21 impl<'a> Yay<&'a ()> for () {
22     type InnerStream<'s> = impl Stream<Item = i32> + 's;
23     //~^ the type
24     fn foo<'s>() -> Self::InnerStream<'s> { todo!() }
25 }
26
27 fn main() {}