]>
Commit | Line | Data |
---|---|---|
2b03887a | 1 | // check-pass |
5099ac24 | 2 | |
353b0b11 | 3 | #![feature(impl_trait_in_assoc_type)] |
5099ac24 FG |
4 | |
5 | pub trait Stream { | |
6 | type Item; | |
7 | } | |
8 | ||
9 | impl Stream for () { | |
10 | type Item = i32; | |
11 | } | |
12 | ||
13 | trait Yay<AdditionalValue> { | |
14 | type InnerStream<'s>: Stream<Item = i32> + 's; | |
15 | fn foo<'s>() -> Self::InnerStream<'s>; | |
16 | } | |
17 | ||
18 | impl<'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 | ||
26 | fn main() {} |