Really fix early lints inside an async desugaring
This commit is contained in:
parent
e6a0f3cdf3
commit
37cb9d30fa
2 changed files with 9 additions and 4 deletions
|
@ -219,10 +219,10 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
|
||||||
|
|
||||||
// Explicitly check for lints associated with 'closure_id', since
|
// Explicitly check for lints associated with 'closure_id', since
|
||||||
// it does not have a corresponding AST node
|
// it does not have a corresponding AST node
|
||||||
if let ast::ExprKind::Closure(_, asyncness, ..) = e.kind {
|
match e.kind {
|
||||||
if let ast::Async::Yes { closure_id, .. } = asyncness {
|
ast::ExprKind::Closure(_, ast::Async::Yes { closure_id, .. }, ..)
|
||||||
self.check_id(closure_id);
|
| ast::ExprKind::Async(_, closure_id, ..) => self.check_id(closure_id),
|
||||||
}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,4 +33,9 @@ fn main() {
|
||||||
fn inner() {
|
fn inner() {
|
||||||
let _ = foo!(third);
|
let _ = foo!(third);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(semicolon_in_expressions_from_macros)]
|
||||||
|
async {
|
||||||
|
let _ = foo!(fourth);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue