summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issues/issue-62517-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/issues/issue-62517-2.rs')
-rw-r--r--tests/ui/async-await/issues/issue-62517-2.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/async-await/issues/issue-62517-2.rs b/tests/ui/async-await/issues/issue-62517-2.rs
new file mode 100644
index 000000000..aaf28d6c1
--- /dev/null
+++ b/tests/ui/async-await/issues/issue-62517-2.rs
@@ -0,0 +1,16 @@
+// Regression test for #62517. We used to ICE when you had an `async
+// fn` with an `impl Trait` return that mentioned a `dyn Bar` with no
+// explicit lifetime bound.
+//
+// edition:2018
+// check-pass
+
+trait Object {}
+
+trait Alpha<Param: ?Sized> {}
+
+async fn foo<'a>(_: &'a ()) -> impl Alpha<dyn Object> {}
+
+impl<T> Alpha<dyn Object> for T { }
+
+fn main() { }