]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/in-trait/async-generics-and-bounds.rs
Rollup merge of #105481 - lqd:mono-stats, r=wesleywiser
[rust.git] / src / test / ui / async-await / in-trait / async-generics-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 use std::hash::Hash;
10
11 trait MyTrait<T, U> {
12     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
13 }
14
15 impl<T, U> MyTrait<T, U> for (T, U) {
16     async fn foo(&self) -> &(T, U) {
17         self
18     }
19 }
20
21 fn main() {}