summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/in-trait/nested-rpit.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/in-trait/nested-rpit.rs')
-rw-r--r--tests/ui/async-await/in-trait/nested-rpit.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/async-await/in-trait/nested-rpit.rs b/tests/ui/async-await/in-trait/nested-rpit.rs
new file mode 100644
index 000000000..41d72ebb4
--- /dev/null
+++ b/tests/ui/async-await/in-trait/nested-rpit.rs
@@ -0,0 +1,19 @@
+// edition: 2021
+// known-bug: #105197
+// failure-status:101
+// dont-check-compiler-stderr
+
+#![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() {}