Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use
ParamName
to track in-scope lifetimes instead of Ident
This allows us to record "fresh" lifetime names for cases like `impl Foo<'_>`.
- Loading branch information
1 parent
60960a2
commit 18e5453
Showing
3 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/test/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Check that `async fn` inside of an impl with `'_` | ||
// in the header compiles correctly. | ||
// | ||
// Regression test for #63500. | ||
// | ||
// check-pass | ||
|
||
#![feature(async_await)] | ||
|
||
struct Foo<'a>(&'a u8); | ||
|
||
impl Foo<'_> { | ||
async fn bar() {} | ||
} | ||
|
||
fn main() { } |