]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/in-trait/async-lifetimes-and-bounds.rs
drive-by: Fix path spans
[rust.git] / src / test / ui / async-await / in-trait / async-lifetimes-and-bounds.rs
1 // check-pass
2 // edition: 2021
3
4 #![feature(async_fn_in_trait)]
5 #![allow(incomplete_features)]
6
7 use std::fmt::Debug;
8
9 trait MyTrait<'a, 'b, T> {
10     async fn foo(&'a self, key: &'b T) -> (&'a Self, &'b T) where T: Debug + Sized;
11 }
12
13 impl<'a, 'b, T, U> MyTrait<'a, 'b, T> for U {
14     async fn foo(&'a self, key: &'b T) -> (&'a U, &'b T) {
15         (self, key)
16     }
17 }
18
19 fn main() {}