@@ -42,7 +42,6 @@ use std::mem;
4242use syntax:: attr:: { self , AttrMetaMethods } ;
4343use syntax:: parse:: token:: InternedString ;
4444use syntax:: ast;
45- use syntax:: attr:: ThinAttributesExt ;
4645use syntax_pos:: Span ;
4746use errors:: DiagnosticBuilder ;
4847use hir;
@@ -767,7 +766,7 @@ impl<'a, 'tcx, 'v> hir_visit::Visitor<'v> for LateContext<'a, 'tcx> {
767766 }
768767
769768 fn visit_expr ( & mut self , e : & hir:: Expr ) {
770- self . with_lint_attrs ( e. attrs . as_attr_slice ( ) , |cx| {
769+ self . with_lint_attrs ( & e. attrs , |cx| {
771770 run_lints ! ( cx, check_expr, late_passes, e) ;
772771 hir_visit:: walk_expr ( cx, e) ;
773772 } )
@@ -832,7 +831,7 @@ impl<'a, 'tcx, 'v> hir_visit::Visitor<'v> for LateContext<'a, 'tcx> {
832831 }
833832
834833 fn visit_local ( & mut self , l : & hir:: Local ) {
835- self . with_lint_attrs ( l. attrs . as_attr_slice ( ) , |cx| {
834+ self . with_lint_attrs ( & l. attrs , |cx| {
836835 run_lints ! ( cx, check_local, late_passes, l) ;
837836 hir_visit:: walk_local ( cx, l) ;
838837 } )
@@ -928,7 +927,7 @@ impl<'a> ast_visit::Visitor for EarlyContext<'a> {
928927 }
929928
930929 fn visit_expr ( & mut self , e : & ast:: Expr ) {
931- self . with_lint_attrs ( e. attrs . as_attr_slice ( ) , |cx| {
930+ self . with_lint_attrs ( & e. attrs , |cx| {
932931 run_lints ! ( cx, check_expr, early_passes, e) ;
933932 ast_visit:: walk_expr ( cx, e) ;
934933 } )
@@ -988,7 +987,7 @@ impl<'a> ast_visit::Visitor for EarlyContext<'a> {
988987 }
989988
990989 fn visit_local ( & mut self , l : & ast:: Local ) {
991- self . with_lint_attrs ( l. attrs . as_attr_slice ( ) , |cx| {
990+ self . with_lint_attrs ( & l. attrs , |cx| {
992991 run_lints ! ( cx, check_local, early_passes, l) ;
993992 ast_visit:: walk_local ( cx, l) ;
994993 } )
0 commit comments