Make nested RPITIT inherit the parent opaque's generics.
This commit is contained in:
parent
cab4fd678c
commit
e2d41f4c97
2 changed files with 18 additions and 15 deletions
17
src/test/ui/async-await/in-trait/nested-rpit.rs
Normal file
17
src/test/ui/async-await/in-trait/nested-rpit.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
// check-pass
|
||||
// edition: 2021
|
||||
|
||||
#![feature(async_fn_in_trait)]
|
||||
#![feature(return_position_impl_trait_in_trait)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
use std::future::Future;
|
||||
use std::marker::PhantomData;
|
||||
|
||||
trait Lockable<K, V> {
|
||||
async fn lock_all_entries(&self) -> impl Future<Output = Guard<'_>>;
|
||||
}
|
||||
|
||||
struct Guard<'a>(PhantomData<&'a ()>);
|
||||
|
||||
fn main() {}
|
Loading…
Add table
Add a link
Reference in a new issue