Visit generics inside visit_fn.

This commit is contained in:
Camille GILLOT 2021-11-19 22:03:43 +01:00
parent aa2b5ef635
commit e47f66dc0d
8 changed files with 65 additions and 40 deletions

View file

@ -441,6 +441,7 @@ impl EarlyLintPass for UnsafeCode {
_,
ast::FnSig { header: ast::FnHeader { unsafety: ast::Unsafe::Yes(_), .. }, .. },
_,
_,
body,
) = fk
{

View file

@ -158,7 +158,7 @@ impl<'a, T: EarlyLintPass> ast_visit::Visitor<'a> for EarlyContextAndPass<'a, T>
// Explicitly check for lints associated with 'closure_id', since
// it does not have a corresponding AST node
if let ast_visit::FnKind::Fn(_, _, sig, _, _) = fk {
if let ast_visit::FnKind::Fn(_, _, sig, _, _, _) = fk {
if let ast::Async::Yes { closure_id, .. } = sig.header.asyncness {
self.check_id(closure_id);
}