2022-10-07 11:08:56 -05:00
|
|
|
// check-fail
|
|
|
|
// known-bug: #102682
|
2022-10-03 20:27:11 -05:00
|
|
|
// edition: 2021
|
2023-03-14 17:23:16 -05:00
|
|
|
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
|
|
|
|
// revisions: current next
|
2022-10-03 20:27:11 -05:00
|
|
|
|
|
|
|
#![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() {}
|