chiark / gitweb /
config, wip macro
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 24 Jul 2021 11:14:15 +0000 (12:14 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 24 Jul 2021 11:14:15 +0000 (12:14 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
macros/macros.rs

index 1585a635eba96b452758269e882f65fe71f9d943..13c727ce0fb12bd49c2adf52adc487ed3883dd8d 100644 (file)
@@ -41,13 +41,9 @@ pub fn resolve(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
     for attr in &field.attrs {
       if attr.tokens.is_empty() {
         let atspan = attr.path.segments.last().unwrap().ident.span();
+        method = quote!{ #attr.path };
         if &attr.path == &parse_quote!{ limited } {
           skl = quote_spanned!{atspan=> SKL::Limited };
-          method = quote_spanned!{atspan=> limited };
-        } else if &attr.path == &parse_quote!{ server } {
-          method = quote_spanned!{atspan=> server };
-        } else if &attr.path == &parse_quote!{ client } {
-          method = quote_spanned!{atspan=> client };
         }
       } else if &attr.path == &parse_quote!{ special } {
         let meta = match attr.parse_meta().unwrap() {