@@ -347,16 +347,17 @@ impl Attribute {
347
347
348
348
pub fn mk_name_value_item_str ( ident : Ident , value : Spanned < Symbol > ) -> MetaItem {
349
349
let lit_kind = LitKind :: Str ( value. node , ast:: StrStyle :: Cooked ) ;
350
- mk_name_value_item ( ident. span . to ( value . span ) , ident , lit_kind, value. span )
350
+ mk_name_value_item ( ident, lit_kind, value. span )
351
351
}
352
352
353
- pub fn mk_name_value_item ( span : Span , ident : Ident , lit_kind : LitKind , lit_span : Span ) -> MetaItem {
353
+ pub fn mk_name_value_item ( ident : Ident , lit_kind : LitKind , lit_span : Span ) -> MetaItem {
354
354
let lit = Lit :: from_lit_kind ( lit_kind, lit_span) ;
355
+ let span = ident. span . to ( lit_span) ;
355
356
MetaItem { path : Path :: from_ident ( ident) , span, node : MetaItemKind :: NameValue ( lit) }
356
357
}
357
358
358
- pub fn mk_list_item ( span : Span , ident : Ident , items : Vec < NestedMetaItem > ) -> MetaItem {
359
- MetaItem { path : Path :: from_ident ( ident) , span, node : MetaItemKind :: List ( items) }
359
+ pub fn mk_list_item ( ident : Ident , items : Vec < NestedMetaItem > ) -> MetaItem {
360
+ MetaItem { path : Path :: from_ident ( ident) , span : ident . span , node : MetaItemKind :: List ( items) }
360
361
}
361
362
362
363
pub fn mk_word_item ( ident : Ident ) -> MetaItem {
@@ -367,7 +368,7 @@ pub fn mk_nested_word_item(ident: Ident) -> NestedMetaItem {
367
368
NestedMetaItem :: MetaItem ( mk_word_item ( ident) )
368
369
}
369
370
370
- pub fn mk_attr_id ( ) -> AttrId {
371
+ crate fn mk_attr_id ( ) -> AttrId {
371
372
use std:: sync:: atomic:: AtomicUsize ;
372
373
use std:: sync:: atomic:: Ordering ;
373
374
0 commit comments