diff options
Diffstat (limited to 'src/librustc_lint/builtin.rs')
| -rw-r--r-- | src/librustc_lint/builtin.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 10b00d35d9b..8916fc08838 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -268,8 +268,8 @@ impl EarlyLintPass for UnsafeCode { } } - fn check_trait_item(&mut self, cx: &EarlyContext<'_>, item: &ast::TraitItem) { - if let ast::TraitItemKind::Method(ref sig, None) = item.kind { + fn check_trait_item(&mut self, cx: &EarlyContext<'_>, item: &ast::AssocItem) { + if let ast::AssocItemKind::Method(ref sig, None) = item.kind { if sig.header.unsafety == ast::Unsafety::Unsafe { self.report_unsafe(cx, item.span, "declaration of an `unsafe` method") } @@ -615,9 +615,9 @@ declare_lint_pass!( ); impl EarlyLintPass for AnonymousParameters { - fn check_trait_item(&mut self, cx: &EarlyContext<'_>, it: &ast::TraitItem) { + fn check_trait_item(&mut self, cx: &EarlyContext<'_>, it: &ast::AssocItem) { match it.kind { - ast::TraitItemKind::Method(ref sig, _) => { + ast::AssocItemKind::Method(ref sig, _) => { for arg in sig.decl.inputs.iter() { match arg.pat.kind { ast::PatKind::Ident(_, ident, None) => { |
