From 1a8612e723f95b7bc0e35e8b4b570accb433f1d3 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 5 Apr 2023 01:01:45 +0900 Subject: [PATCH] Add regression test for #93911 Signed-off-by: Yuki Okushi --- tests/ui/lifetimes/issue-93911.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/ui/lifetimes/issue-93911.rs diff --git a/tests/ui/lifetimes/issue-93911.rs b/tests/ui/lifetimes/issue-93911.rs new file mode 100644 index 0000000000000..b7ccac1ee521c --- /dev/null +++ b/tests/ui/lifetimes/issue-93911.rs @@ -0,0 +1,18 @@ +// check-pass +// edition:2021 + +#![allow(dead_code)] + +struct Foo<'a>(&'a u32); + +impl<'a> Foo<'a> { + async fn foo() { + struct Bar<'b>(&'b u32); + + impl<'b> Bar<'b> { + async fn bar() {} + } + } +} + +fn main() {}