@@ -198,7 +198,7 @@ impl Attribute {
198198
199199 pub fn is_word ( & self ) -> bool {
200200 if let AttrKind :: Normal ( item) = & self . kind {
201- matches ! ( item. args, MacArgs :: Empty )
201+ matches ! ( * item. args, MacArgs :: Empty )
202202 } else {
203203 false
204204 }
@@ -354,7 +354,7 @@ crate fn mk_attr_id() -> AttrId {
354354 AttrId ( id)
355355}
356356
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 {
358358 mk_attr_from_item ( style, AttrItem { path, args } , span)
359359}
360360
@@ -512,8 +512,8 @@ impl MetaItem {
512512}
513513
514514impl 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 {
517517 MetaItemKind :: Word => MacArgs :: Empty ,
518518 MetaItemKind :: NameValue ( lit) => MacArgs :: Eq ( span, lit. token_tree ( ) . into ( ) ) ,
519519 MetaItemKind :: List ( list) => {
@@ -528,7 +528,7 @@ impl MetaItemKind {
528528 DelimSpan :: from_single ( span) , MacDelimiter :: Parenthesis , TokenStream :: new ( tts)
529529 )
530530 }
531- }
531+ } )
532532 }
533533
534534 fn token_trees_and_joints ( & self , span : Span ) -> Vec < TreeAndJoint > {
0 commit comments