@@ -198,7 +198,7 @@ impl Attribute {
198
198
199
199
pub fn is_word ( & self ) -> bool {
200
200
if let AttrKind :: Normal ( item) = & self . kind {
201
- matches ! ( item. args, MacArgs :: Empty )
201
+ matches ! ( * item. args, MacArgs :: Empty )
202
202
} else {
203
203
false
204
204
}
@@ -354,7 +354,7 @@ crate fn mk_attr_id() -> AttrId {
354
354
AttrId ( id)
355
355
}
356
356
357
- pub fn mk_attr ( style : AttrStyle , path : Path , args : MacArgs , span : Span ) -> Attribute {
357
+ pub fn mk_attr ( style : AttrStyle , path : Path , args : P < MacArgs > , span : Span ) -> Attribute {
358
358
mk_attr_from_item ( style, AttrItem { path, args } , span)
359
359
}
360
360
@@ -512,8 +512,8 @@ impl MetaItem {
512
512
}
513
513
514
514
impl MetaItemKind {
515
- pub fn mac_args ( & self , span : Span ) -> MacArgs {
516
- match self {
515
+ pub fn mac_args ( & self , span : Span ) -> P < MacArgs > {
516
+ P ( match self {
517
517
MetaItemKind :: Word => MacArgs :: Empty ,
518
518
MetaItemKind :: NameValue ( lit) => MacArgs :: Eq ( span, lit. token_tree ( ) . into ( ) ) ,
519
519
MetaItemKind :: List ( list) => {
@@ -528,7 +528,7 @@ impl MetaItemKind {
528
528
DelimSpan :: from_single ( span) , MacDelimiter :: Parenthesis , TokenStream :: new ( tts)
529
529
)
530
530
}
531
- }
531
+ } )
532
532
}
533
533
534
534
fn token_trees_and_joints ( & self , span : Span ) -> Vec < TreeAndJoint > {
0 commit comments