diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-11-19 22:03:43 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-04-17 11:03:33 +0200 |
| commit | e47f66dc0d2697aab816fe045fb00195bac18596 (patch) | |
| tree | ff712e0ba6d600f82a0f220202b57bd8d2d42293 /compiler/rustc_lint/src | |
| parent | aa2b5ef6356f41f9173fe3dc1e5dc3e27290436c (diff) | |
| download | rust-e47f66dc0d2697aab816fe045fb00195bac18596.tar.gz rust-e47f66dc0d2697aab816fe045fb00195bac18596.zip | |
Visit generics inside visit_fn.
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/early.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index e6f9246d732..77fe76af2de 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -441,6 +441,7 @@ impl EarlyLintPass for UnsafeCode { _, ast::FnSig { header: ast::FnHeader { unsafety: ast::Unsafe::Yes(_), .. }, .. }, _, + _, body, ) = fk { diff --git a/compiler/rustc_lint/src/early.rs b/compiler/rustc_lint/src/early.rs index 7447f9f64b7..e7855f8057c 100644 --- a/compiler/rustc_lint/src/early.rs +++ b/compiler/rustc_lint/src/early.rs @@ -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); } |
