diff options
| author | Dániel Buga <bugadani@gmail.com> | 2021-01-29 08:31:08 +0100 |
|---|---|---|
| committer | Dániel Buga <bugadani@gmail.com> | 2021-02-01 09:23:39 +0100 |
| commit | b87e1ecdf05d4fb2d14f13d760bb37098c58b06e (patch) | |
| tree | 366f3510245bdb4f2783398babd5da30fac59d89 /compiler/rustc_lint/src/internal.rs | |
| parent | fee0d31397c5ac46d08867e903131d1d73825a9e (diff) | |
| download | rust-b87e1ecdf05d4fb2d14f13d760bb37098c58b06e.tar.gz rust-b87e1ecdf05d4fb2d14f13d760bb37098c58b06e.zip | |
Box the biggest ast::ItemKind variants
Diffstat (limited to 'compiler/rustc_lint/src/internal.rs')
| -rw-r--r-- | compiler/rustc_lint/src/internal.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/internal.rs b/compiler/rustc_lint/src/internal.rs index af5972c6c81..26e536e8f1d 100644 --- a/compiler/rustc_lint/src/internal.rs +++ b/compiler/rustc_lint/src/internal.rs @@ -2,7 +2,7 @@ //! Clippy. use crate::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext}; -use rustc_ast::{Item, ItemKind}; +use rustc_ast::{ImplKind, Item, ItemKind}; use rustc_data_structures::fx::FxHashMap; use rustc_errors::Applicability; use rustc_hir::def::Res; @@ -243,7 +243,7 @@ declare_lint_pass!(LintPassImpl => [LINT_PASS_IMPL_WITHOUT_MACRO]); impl EarlyLintPass for LintPassImpl { fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { - if let ItemKind::Impl { of_trait: Some(lint_pass), .. } = &item.kind { + if let ItemKind::Impl(box ImplKind { of_trait: Some(lint_pass), .. }) = &item.kind { if let Some(last) = lint_pass.path.segments.last() { if last.ident.name == sym::LintPass { let expn_data = lint_pass.path.span.ctxt().outer_expn_data(); |
