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