@@ -179,8 +179,8 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
179179 Attribute :: Parsed ( AttributeKind :: AllowConstFnUnstable ( _, first_span) ) => {
180180 self . check_rustc_allow_const_fn_unstable ( hir_id, * first_span, span, target)
181181 }
182- Attribute :: Parsed ( AttributeKind :: Deprecation { .. } ) => {
183- self . check_deprecated ( hir_id, attr , span , target)
182+ Attribute :: Parsed ( AttributeKind :: Deprecation { span : attr_span , .. } ) => {
183+ self . check_deprecated ( hir_id, * attr_span , target)
184184 }
185185 Attribute :: Parsed ( AttributeKind :: TargetFeature { attr_span, ..} ) => {
186186 self . check_target_feature ( hir_id, * attr_span, target, attrs)
@@ -1872,7 +1872,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
18721872 }
18731873 }
18741874
1875- fn check_deprecated ( & self , hir_id : HirId , attr : & Attribute , _span : Span , target : Target ) {
1875+ fn check_deprecated ( & self , hir_id : HirId , attr_span : Span , target : Target ) {
18761876 match target {
18771877 Target :: AssocConst | Target :: Method ( ..) | Target :: AssocTy
18781878 if matches ! (
@@ -1883,8 +1883,8 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
18831883 self . tcx . emit_node_span_lint (
18841884 UNUSED_ATTRIBUTES ,
18851885 hir_id,
1886- attr . span ( ) ,
1887- errors:: DeprecatedAnnotationHasNoEffect { span : attr . span ( ) } ,
1886+ attr_span ,
1887+ errors:: DeprecatedAnnotationHasNoEffect { span : attr_span } ,
18881888 ) ;
18891889 }
18901890 _ => { }
0 commit comments