summaryrefslogtreecommitdiffstats
path: root/src/test/ui/async-await/in-trait/async-generics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/async-await/in-trait/async-generics.rs')
-rw-r--r--src/test/ui/async-await/in-trait/async-generics.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/async-await/in-trait/async-generics.rs b/src/test/ui/async-await/in-trait/async-generics.rs
new file mode 100644
index 000000000..67000e577
--- /dev/null
+++ b/src/test/ui/async-await/in-trait/async-generics.rs
@@ -0,0 +1,18 @@
+// check-fail
+// known-bug: #102682
+// edition: 2021
+
+#![feature(async_fn_in_trait)]
+#![allow(incomplete_features)]
+
+trait MyTrait<T, U> {
+ async fn foo(&self) -> &(T, U);
+}
+
+impl<T, U> MyTrait<T, U> for (T, U) {
+ async fn foo(&self) -> &(T, U) {
+ self
+ }
+}
+
+fn main() {}