rust/tests/ui/async-await/in-trait/async-generics-and-bounds.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
288 B
Rust
Raw Normal View History

2024-09-22 19:42:55 +00:00
//@ known-bug: #130935
//@ edition: 2021
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() {}