Visit generics inside visit_fn.
This commit is contained in:
parent
aa2b5ef635
commit
e47f66dc0d
8 changed files with 65 additions and 40 deletions
|
@ -441,6 +441,7 @@ impl EarlyLintPass for UnsafeCode {
|
|||
_,
|
||||
ast::FnSig { header: ast::FnHeader { unsafety: ast::Unsafe::Yes(_), .. }, .. },
|
||||
_,
|
||||
_,
|
||||
body,
|
||||
) = fk
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue