@@ -197,7 +197,7 @@ impl<S: Stage> SingleAttributeParser<S> for RustcLintOptDenyFieldAccessParser {
197197 fn convert ( cx : & mut AcceptContext < ' _ , ' _ , S > , args : & ArgParser ) -> Option < AttributeKind > {
198198 let Some ( arg) = args. list ( ) . and_then ( MetaItemListParser :: single) else {
199199 let attr_span = cx. attr_span ;
200- cx. adcx ( ) . expected_single_argument ( attr_span) ;
200+ cx. adcx ( ) . expected_single_argument ( attr_span, 2 ) ;
201201 return None ;
202202 } ;
203203
@@ -382,7 +382,7 @@ impl<S: Stage> SingleAttributeParser<S> for RustcDeprecatedSafe2024Parser {
382382 } ;
383383
384384 let Some ( single) = args. single ( ) else {
385- cx. adcx ( ) . expected_single_argument ( args. span ) ;
385+ cx. adcx ( ) . expected_single_argument ( args. span , args . len ( ) ) ;
386386 return None ;
387387 } ;
388388
@@ -1022,7 +1022,7 @@ impl<S: Stage> SingleAttributeParser<S> for RustcIfThisChangedParser {
10221022 ArgParser :: List ( list) => {
10231023 let Some ( item) = list. single ( ) else {
10241024 let attr_span = cx. attr_span ;
1025- cx. adcx ( ) . expected_single_argument ( attr_span) ;
1025+ cx. adcx ( ) . expected_single_argument ( attr_span, list . len ( ) ) ;
10261026 return None ;
10271027 } ;
10281028 let Some ( ident) = item. meta_item ( ) . and_then ( |item| item. ident ( ) ) else {
@@ -1084,7 +1084,7 @@ impl<S: Stage> CombineAttributeParser<S> for RustcThenThisWouldNeedParser {
10841084 }
10851085 let Some ( item) = args. list ( ) . and_then ( |l| l. single ( ) ) else {
10861086 let inner_span = cx. inner_span ;
1087- cx. adcx ( ) . expected_single_argument ( inner_span) ;
1087+ cx. adcx ( ) . expected_single_argument ( inner_span, 2 ) ;
10881088 return None ;
10891089 } ;
10901090 let Some ( ident) = item. meta_item ( ) . and_then ( |item| item. ident ( ) ) else {
0 commit comments