summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/in-trait/async-generics-and-bounds.rs
blob: 146e74ec2d03b812f1c771f2a7db2978e1e088ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// check-fail
// known-bug: #102682
// edition: 2021
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
// revisions: current next

#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]

use std::fmt::Debug;
use std::hash::Hash;

trait MyTrait<T, U> {
    async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
}

impl<T, U> MyTrait<T, U> for (T, U) {
    async fn foo(&self) -> &(T, U) {
        self
    }
}

fn main() {}