2022-12-04 08:18:52 -06:00
|
|
|
//@ edition: 2021
|
2023-04-28 15:21:03 -05:00
|
|
|
//@ check-pass
|
2022-12-04 08:18:52 -06:00
|
|
|
|
|
|
|
use std::future::Future;
|
|
|
|
use std::marker::PhantomData;
|
|
|
|
|
|
|
|
trait Lockable<K, V> {
|
2023-09-26 15:20:25 -05:00
|
|
|
#[allow(async_fn_in_trait)]
|
2022-12-04 08:18:52 -06:00
|
|
|
async fn lock_all_entries(&self) -> impl Future<Output = Guard<'_>>;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Guard<'a>(PhantomData<&'a ()>);
|
|
|
|
|
|
|
|
fn main() {}
|