Auto merge of #81699 - jethrogb:fix-81531, r=petrochenkov
Really fix early lints inside an async desugaring Fixes #81531 cc `@Aaron1011` r? `@petrochenkov`
This commit is contained in:
commit
6ad11e2e25
@ -219,10 +219,10 @@ fn visit_expr_post(&mut self, e: &'a ast::Expr) {
|
||||
|
||||
// Explicitly check for lints associated with 'closure_id', since
|
||||
// it does not have a corresponding AST node
|
||||
if let ast::ExprKind::Closure(_, asyncness, ..) = e.kind {
|
||||
if let ast::Async::Yes { closure_id, .. } = asyncness {
|
||||
self.check_id(closure_id);
|
||||
}
|
||||
match e.kind {
|
||||
ast::ExprKind::Closure(_, ast::Async::Yes { closure_id, .. }, ..)
|
||||
| ast::ExprKind::Async(_, closure_id, ..) => self.check_id(closure_id),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,4 +33,9 @@ fn main() {
|
||||
fn inner() {
|
||||
let _ = foo!(third);
|
||||
}
|
||||
|
||||
#[allow(semicolon_in_expressions_from_macros)]
|
||||
async {
|
||||
let _ = foo!(fourth);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user