rust/tests/ui/async-await/in-trait/nested-rpit.rs

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

15 lines
274 B
Rust
Raw Normal View History

//@ edition: 2021
//@ check-pass
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)]
async fn lock_all_entries(&self) -> impl Future<Output = Guard<'_>>;
}
struct Guard<'a>(PhantomData<&'a ()>);
fn main() {}