clear in-scope lifetimes for nested items in HIR lowering
This was causing us to incorrectly think the lifetimes were already declared on the scope for the nested item, when in fact they are not inherited.
This commit is contained in:
parent
a02a171e6a
commit
e4756e6b07
3 changed files with 65 additions and 4 deletions
17
src/test/ui/async-await/nested-in-impl.rs
Normal file
17
src/test/ui/async-await/nested-in-impl.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Test that async fn works when nested inside of
|
||||
// impls with lifetime parameters.
|
||||
//
|
||||
// check-pass
|
||||
// edition:2018
|
||||
|
||||
#![feature(async_await)]
|
||||
|
||||
struct Foo<'a>(&'a ());
|
||||
|
||||
impl<'a> Foo<'a> {
|
||||
fn test() {
|
||||
async fn test() {}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() { }
|
Loading…
Add table
Add a link
Reference in a new issue