@@ -59,9 +59,11 @@ impl<'tcx, T: LateLintPass<'tcx>> LateContextAndPass<'tcx, T> {
5959 let attrs = self . context . tcx . hir ( ) . attrs ( id) ;
6060 let prev = self . context . last_node_with_lint_attrs ;
6161 self . context . last_node_with_lint_attrs = id;
62- self . enter_attrs ( attrs) ;
62+ debug ! ( "late context: enter_attrs({:?})" , attrs) ;
63+ lint_callback ! ( self , enter_lint_attrs, attrs) ;
6364 f ( self ) ;
64- self . exit_attrs ( attrs) ;
65+ debug ! ( "late context: exit_attrs({:?})" , attrs) ;
66+ lint_callback ! ( self , exit_lint_attrs, attrs) ;
6567 self . context . last_node_with_lint_attrs = prev;
6668 }
6769
@@ -81,16 +83,6 @@ impl<'tcx, T: LateLintPass<'tcx>> LateContextAndPass<'tcx, T> {
8183 hir_visit:: walk_mod ( self , m, n) ;
8284 lint_callback ! ( self , check_mod_post, m, s, n) ;
8385 }
84-
85- fn enter_attrs ( & mut self , attrs : & ' tcx [ ast:: Attribute ] ) {
86- debug ! ( "late context: enter_attrs({:?})" , attrs) ;
87- lint_callback ! ( self , enter_lint_attrs, attrs) ;
88- }
89-
90- fn exit_attrs ( & mut self , attrs : & ' tcx [ ast:: Attribute ] ) {
91- debug ! ( "late context: exit_attrs({:?})" , attrs) ;
92- lint_callback ! ( self , exit_lint_attrs, attrs) ;
93- }
9486}
9587
9688impl < ' tcx , T : LateLintPass < ' tcx > > hir_visit:: Visitor < ' tcx > for LateContextAndPass < ' tcx , T > {
0 commit comments