diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-02 03:53:54 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-02 03:53:54 +0530 |
| commit | ef8b20a564bab2050403f2f5c1dab90e0941adf7 (patch) | |
| tree | 2b3c20e265a5c424a54f7175dcb49743960641ed | |
| parent | 85bdb313064eb799b8f0ed4946ff5443c8b9487d (diff) | |
| parent | 2fc62244113d01e9524ed712210ba52e8471e2a9 (diff) | |
Rollup merge of #22821 - ipetkov:lint-method-rename, r=eddyb
Traits can have associated types and not just methods. This clarification reflects the the type of the input the method accepts. [breaking-change]
| -rw-r--r-- | src/librustc/lint/context.rs | 2 | ||||
| -rw-r--r-- | src/librustc/lint/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustc_lint/builtin.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs index 2b968736ffd..f635c77af9b 100644 --- a/src/librustc/lint/context.rs +++ b/src/librustc/lint/context.rs @@ -612,7 +612,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for Context<'a, 'tcx> { } fn visit_trait_item(&mut self, m: &ast::TraitItem) { - run_lints!(self, check_trait_method, m); + run_lints!(self, check_trait_item, m); visit::walk_trait_item(self, m); } diff --git a/src/librustc/lint/mod.rs b/src/librustc/lint/mod.rs index f3fa3b8846c..506d20133bd 100644 --- a/src/librustc/lint/mod.rs +++ b/src/librustc/lint/mod.rs @@ -144,7 +144,7 @@ pub trait LintPass { fn check_fn(&mut self, _: &Context, _: FnKind, _: &ast::FnDecl, _: &ast::Block, _: Span, _: ast::NodeId) { } fn check_ty_method(&mut self, _: &Context, _: &ast::TypeMethod) { } - fn check_trait_method(&mut self, _: &Context, _: &ast::TraitItem) { } + fn check_trait_item(&mut self, _: &Context, _: &ast::TraitItem) { } fn check_struct_def(&mut self, _: &Context, _: &ast::StructDef, _: ast::Ident, _: &ast::Generics, _: ast::NodeId) { } fn check_struct_def_post(&mut self, _: &Context, diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index d0fccf6495a..4785cde1456 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -1577,7 +1577,7 @@ impl LintPass for MissingDoc { tm.span, "a type method"); } - fn check_trait_method(&mut self, cx: &Context, it: &ast::TraitItem) { + fn check_trait_item(&mut self, cx: &Context, it: &ast::TraitItem) { if let ast::TraitItem::TypeTraitItem(ref ty) = *it { let assoc_ty = &ty.ty_param; self.check_missing_docs_attrs(cx, Some(assoc_ty.id), &ty.attrs, |
