@@ -7,7 +7,7 @@ use std::sync::Arc;
77use rustc_ast:: tokenstream:: { self , TokenTree } ;
88use rustc_ast:: { token, DelimArgs } ;
99use rustc_errors:: { Diag , ErrorGuaranteed } ;
10- use rustc_hir:: { AttrArgs , AttrItem , AttrKind , Attribute , HirId } ;
10+ use rustc_hir:: { AttrArgs , AttrItem , Attribute , HirId } ;
1111use rustc_middle:: ty:: TyCtxt ;
1212use rustc_span:: symbol:: Ident ;
1313use rustc_span:: Span ;
@@ -351,7 +351,7 @@ impl<'tcx> AttrParser<'tcx> {
351351 ..
352352 } ) = & item. args
353353 else {
354- self . error ( attr. span , |diag| {
354+ self . error ( attr. span ( ) , |diag| {
355355 diag. help ( "correct usage looks like `#[kint::preempt_count(...)]`" ) ;
356356 } ) ?;
357357 } ;
@@ -410,15 +410,15 @@ impl<'tcx> AttrParser<'tcx> {
410410 }
411411
412412 fn parse ( & self , attr : & Attribute ) -> Option < KlintAttribute > {
413- let AttrKind :: Normal ( item) = & attr. kind else {
413+ let Attribute :: Unparsed ( item) = attr else {
414414 return None ;
415415 } ;
416416 if item. path . segments [ 0 ] . name != * crate :: symbol:: klint {
417417 return None ;
418418 } ;
419419 if item. path . segments . len ( ) != 2 {
420420 self . tcx
421- . node_span_lint ( crate :: INCORRECT_ATTRIBUTE , self . hir_id , attr . span , |lint| {
421+ . node_span_lint ( crate :: INCORRECT_ATTRIBUTE , self . hir_id , item . span , |lint| {
422422 lint. primary_message ( "invalid klint attribute" ) ;
423423 } ) ;
424424 return None ;
0 commit comments