summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/nested-in-impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/nested-in-impl.rs')
-rw-r--r--tests/ui/async-await/nested-in-impl.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/async-await/nested-in-impl.rs b/tests/ui/async-await/nested-in-impl.rs
new file mode 100644
index 000000000..76ed827d5
--- /dev/null
+++ b/tests/ui/async-await/nested-in-impl.rs
@@ -0,0 +1,15 @@
+// Test that async fn works when nested inside of
+// impls with lifetime parameters.
+//
+// check-pass
+// edition:2018
+
+struct Foo<'a>(&'a ());
+
+impl<'a> Foo<'a> {
+ fn test() {
+ async fn test() {}
+ }
+}
+
+fn main() { }