diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-08 00:13:59 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-12 18:05:05 +0100 |
| commit | e52f902a8ab3a1abbb200607db4766d95b27bc8e (patch) | |
| tree | b18f861d3bf0f8389c6f98dd3c1c38103d4ab81e /src/librustc_lint/builtin.rs | |
| parent | abf2e7aa959a4611bc2f607bc7e9200b8b81c089 (diff) | |
| download | rust-e52f902a8ab3a1abbb200607db4766d95b27bc8e.tar.gz rust-e52f902a8ab3a1abbb200607db4766d95b27bc8e.zip | |
`AssocImplKind::{Method -> Fn}`.
Diffstat (limited to 'src/librustc_lint/builtin.rs')
| -rw-r--r-- | src/librustc_lint/builtin.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 8916fc08838..1fc89961889 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -269,7 +269,7 @@ impl EarlyLintPass for UnsafeCode { } fn check_trait_item(&mut self, cx: &EarlyContext<'_>, item: &ast::AssocItem) { - if let ast::AssocItemKind::Method(ref sig, None) = item.kind { + if let ast::AssocItemKind::Fn(ref sig, None) = item.kind { if sig.header.unsafety == ast::Unsafety::Unsafe { self.report_unsafe(cx, item.span, "declaration of an `unsafe` method") } @@ -617,7 +617,7 @@ declare_lint_pass!( impl EarlyLintPass for AnonymousParameters { fn check_trait_item(&mut self, cx: &EarlyContext<'_>, it: &ast::AssocItem) { match it.kind { - ast::AssocItemKind::Method(ref sig, _) => { + ast::AssocItemKind::Fn(ref sig, _) => { for arg in sig.decl.inputs.iter() { match arg.pat.kind { ast::PatKind::Ident(_, ident, None) => { |
