rust/tests/ui/async-await/in-trait/async-generics.rs
2023-01-11 09:32:08 +00:00

19 lines
288 B
Rust

// check-fail
// known-bug: #102682
// edition: 2021
#![feature(async_fn_in_trait)]
#![allow(incomplete_features)]
trait MyTrait<T, U> {
async fn foo(&self) -> &(T, U);
}
impl<T, U> MyTrait<T, U> for (T, U) {
async fn foo(&self) -> &(T, U) {
self
}
}
fn main() {}