X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_lint%2Fsrc%2Flate.rs;h=a329b37519d98a04ec661f9c194918b0c8614b5b;hb=1202bbaf48a0a919a2e0cfd8b7dce97e8fc3030d;hp=afb18451cf3984603bc4c06e1425ddf64b41d520;hpb=b90a0ede02f122a91b376cb2a8632a370269dd60;p=rust.git diff --git a/compiler/rustc_lint/src/late.rs b/compiler/rustc_lint/src/late.rs index afb18451cf3..a329b37519d 100644 --- a/compiler/rustc_lint/src/late.rs +++ b/compiler/rustc_lint/src/late.rs @@ -81,7 +81,6 @@ fn with_param_env(&mut self, id: hir::HirId, f: F) fn process_mod(&mut self, m: &'tcx hir::Mod<'tcx>, s: Span, n: hir::HirId) { lint_callback!(self, check_mod, m, s, n); hir_visit::walk_mod(self, m, n); - lint_callback!(self, check_mod_post, m, s, n); } } @@ -118,7 +117,6 @@ fn visit_nested_body(&mut self, body_id: hir::BodyId) { fn visit_param(&mut self, param: &'tcx hir::Param<'tcx>) { self.with_lint_attrs(param.hir_id, |cx| { - lint_callback!(cx, check_param, param); hir_visit::walk_param(cx, param); }); } @@ -151,7 +149,6 @@ fn visit_foreign_item(&mut self, it: &'tcx hir::ForeignItem<'tcx>) { cx.with_param_env(it.hir_id(), |cx| { lint_callback!(cx, check_foreign_item, it); hir_visit::walk_foreign_item(cx, it); - lint_callback!(cx, check_foreign_item_post, it); }); }) } @@ -193,7 +190,6 @@ fn visit_fn( let body = self.context.tcx.hir().body(body_id); lint_callback!(self, check_fn, fk, decl, body, span, id); hir_visit::walk_fn(self, fk, decl, body_id, span, id); - lint_callback!(self, check_fn_post, fk, decl, body, span, id); self.context.enclosing_body = old_enclosing_body; self.context.cached_typeck_results.set(old_cached_typeck_results); } @@ -208,7 +204,6 @@ fn visit_variant_data( ) { lint_callback!(self, check_struct_def, s); hir_visit::walk_struct_def(self, s); - lint_callback!(self, check_struct_def_post, s); } fn visit_field_def(&mut self, s: &'tcx hir::FieldDef<'tcx>) { @@ -227,7 +222,6 @@ fn visit_variant( self.with_lint_attrs(v.id, |cx| { lint_callback!(cx, check_variant, v); hir_visit::walk_variant(cx, v, g, item_id); - lint_callback!(cx, check_variant_post, v); }) } @@ -237,14 +231,9 @@ fn visit_ty(&mut self, t: &'tcx hir::Ty<'tcx>) { } fn visit_infer(&mut self, inf: &'tcx hir::InferArg) { - lint_callback!(self, check_infer, inf); hir_visit::walk_inf(self, inf); } - fn visit_name(&mut self, sp: Span, name: Symbol) { - lint_callback!(self, check_name, sp, name); - } - fn visit_mod(&mut self, m: &'tcx hir::Mod<'tcx>, s: Span, n: hir::HirId) { if !self.context.only_module { self.process_mod(m, s, n); @@ -280,7 +269,6 @@ fn visit_generics(&mut self, g: &'tcx hir::Generics<'tcx>) { } fn visit_where_predicate(&mut self, p: &'tcx hir::WherePredicate<'tcx>) { - lint_callback!(self, check_where_predicate, p); hir_visit::walk_where_predicate(self, p); } @@ -300,7 +288,6 @@ fn visit_trait_item(&mut self, trait_item: &'tcx hir::TraitItem<'tcx>) { cx.with_param_env(trait_item.hir_id(), |cx| { lint_callback!(cx, check_trait_item, trait_item); hir_visit::walk_trait_item(cx, trait_item); - lint_callback!(cx, check_trait_item_post, trait_item); }); }); self.context.generics = generics; @@ -320,7 +307,6 @@ fn visit_impl_item(&mut self, impl_item: &'tcx hir::ImplItem<'tcx>) { } fn visit_lifetime(&mut self, lt: &'tcx hir::Lifetime) { - lint_callback!(self, check_lifetime, lt); hir_visit::walk_lifetime(self, lt); }