]> git.proxmox.com Git - rustc.git/blame - tests/ui/generic-associated-types/issue-86218.rs
Update upstream source from tag 'upstream/1.70.0+dfsg1'
[rustc.git] / tests / ui / generic-associated-types / issue-86218.rs
CommitLineData
2b03887a 1// check-pass
5099ac24 2
353b0b11 3#![feature(impl_trait_in_assoc_type)]
5099ac24
FG
4
5pub trait Stream {
6 type Item;
7}
8
9impl Stream for () {
10 type Item = i32;
11}
12
13trait Yay<AdditionalValue> {
14 type InnerStream<'s>: Stream<Item = i32> + 's;
15 fn foo<'s>() -> Self::InnerStream<'s>;
16}
17
18impl<'a> Yay<&'a ()> for () {
19 type InnerStream<'s> = impl Stream<Item = i32> + 's;
2b03887a 20 //^ ERROR does not fulfill the required lifetime
353b0b11
FG
21 fn foo<'s>() -> Self::InnerStream<'s> {
22 ()
23 }
5099ac24
FG
24}
25
26fn main() {}