@@ -23,7 +23,8 @@ use crate::*;
2323
2424/// Macro to easily implement [`AttributeValue`] for types implementing
2525/// [`Parse`] and [`ToTokens`].
26- macro_rules! ParseToTokensAttribute {
26+ #[ macro_export]
27+ macro_rules! impl_Attribute_for_Parse_and_ToTokens {
2728 ( $( $type: ty) ,+ $( , ) ?) => { $(
2829 impl AttributeBase for $type {
2930 type Partial = Self ;
@@ -100,12 +101,12 @@ impl AttributeMeta for TokenStream {
100101// };
101102// }
102103
103- ParseToTokensAttribute ! ( Type ) ;
104- ParseToTokensAttribute ! ( Path ) ;
105- ParseToTokensAttribute ! ( Lit ) ;
106- ParseToTokensAttribute ! [ LitStr , LitByteStr , LitChar , LitInt , LitFloat , LitBool ] ;
107- ParseToTokensAttribute ! ( Expr ) ;
108- ParseToTokensAttribute ! [ TokenTree , Group , Punct , Literal ] ;
104+ impl_Attribute_for_Parse_and_ToTokens ! ( Type ) ;
105+ impl_Attribute_for_Parse_and_ToTokens ! ( Path ) ;
106+ impl_Attribute_for_Parse_and_ToTokens ! ( Lit ) ;
107+ impl_Attribute_for_Parse_and_ToTokens ! [ LitStr , LitByteStr , LitChar , LitInt , LitFloat , LitBool ] ;
108+ impl_Attribute_for_Parse_and_ToTokens ! ( Expr ) ;
109+ impl_Attribute_for_Parse_and_ToTokens ! [ TokenTree , Group , Punct , Literal ] ;
109110
110111// // TODO make this warning better visable
111112// ParseToTokensAttribute! {
@@ -118,7 +119,7 @@ ParseToTokensAttribute![TokenTree, Group, Punct, Literal];
118119// }
119120
120121// Some probably useless stuff
121- ParseToTokensAttribute ! [
122+ impl_Attribute_for_Parse_and_ToTokens ! [
122123 Abi ,
123124 Abstract ,
124125 Plus ,
@@ -283,7 +284,7 @@ mod syn_full {
283284
284285 use super :: * ;
285286
286- ParseToTokensAttribute ! [
287+ impl_Attribute_for_Parse_and_ToTokens ! [
287288 Arm ,
288289 Block ,
289290 ExprArray ,
0 commit comments