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() {}