@@ -23,7 +23,8 @@ use crate::*;
23
23
24
24
/// Macro to easily implement [`AttributeValue`] for types implementing
25
25
/// [`Parse`] and [`ToTokens`].
26
- macro_rules! ParseToTokensAttribute {
26
+ #[ macro_export]
27
+ macro_rules! impl_Attribute_for_Parse_and_ToTokens {
27
28
( $( $type: ty) ,+ $( , ) ?) => { $(
28
29
impl AttributeBase for $type {
29
30
type Partial = Self ;
@@ -100,12 +101,12 @@ impl AttributeMeta for TokenStream {
100
101
// };
101
102
// }
102
103
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 ] ;
109
110
110
111
// // TODO make this warning better visable
111
112
// ParseToTokensAttribute! {
@@ -118,7 +119,7 @@ ParseToTokensAttribute![TokenTree, Group, Punct, Literal];
118
119
// }
119
120
120
121
// Some probably useless stuff
121
- ParseToTokensAttribute ! [
122
+ impl_Attribute_for_Parse_and_ToTokens ! [
122
123
Abi ,
123
124
Abstract ,
124
125
Plus ,
@@ -283,7 +284,7 @@ mod syn_full {
283
284
284
285
use super :: * ;
285
286
286
- ParseToTokensAttribute ! [
287
+ impl_Attribute_for_Parse_and_ToTokens ! [
287
288
Arm ,
288
289
Block ,
289
290
ExprArray ,
0 commit comments