]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/in-trait/async-lifetimes.rs
Rollup merge of #105481 - lqd:mono-stats, r=wesleywiser
[rust.git] / src / test / ui / async-await / in-trait / async-lifetimes.rs
1 // check-pass
2 // edition: 2021
3
4 #![feature(async_fn_in_trait)]
5 #![allow(incomplete_features)]
6
7 trait MyTrait<'a, 'b, T> {
8     async fn foo(&'a self, key: &'b T) -> (&'a Self, &'b T);
9 }
10
11 impl<'a, 'b, T, U> MyTrait<'a, 'b, T> for U {
12     async fn foo(&'a self, key: &'b T) -> (&'a U, &'b T) {
13         (self, key)
14     }
15 }
16
17 fn main() {}