mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
15 lines
274 B
Rust
15 lines
274 B
Rust
//@ edition: 2021
|
|
//@ check-pass
|
|
|
|
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() {}
|