forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#81541 - Aaron1011:early-lint-async-fn, r=petr…
…ochenkov Fix early lints inside an async desugaring Fixes rust-lang#81531 When we buffer an early lint for a macro invocation, we need to determine which NodeId to take the lint level from. Currently, we use the NodeId of the closest def parent. However, if the macro invocation is inside the desugared closure from an `async fn` or async closure, that NodeId does not actually exist in the AST. This commit uses the parent of a desugared closure when computing `lint_node_id`, which is something that actually exists in the AST (an `async fn` or async closure).
- Loading branch information
Showing
3 changed files
with
25 additions
and
3 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
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