rust/tests/ui/async-await/in-trait/nested-rpit.rs
2023-10-13 21:01:36 +00:00

17 lines
304 B
Rust

// edition: 2021
// check-pass
#![allow(incomplete_features)]
use std::future::Future;
use std::marker::PhantomData;
trait Lockable<K, V> {
#[allow(async_fn_in_trait)]
async fn lock_all_entries(&self) -> impl Future<Output = Guard<'_>>;
}
struct Guard<'a>(PhantomData<&'a ()>);
fn main() {}