chiark / gitweb /
config: Set the SKL explicitly for `client` attribute
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Aug 2021 17:50:47 +0000 (18:50 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Aug 2021 18:51:01 +0000 (19:51 +0100)
This removes the default SKL, so we will notice if we don't have
attributes that set one.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
macros/macros.rs

index b6d4bf3b5844658ef1ddbc1f7cbff962b78d98e8..93b1d8a4d6bba04f5ac663f92626815f885cd3a0 100644 (file)
@@ -64,7 +64,7 @@ pub fn resolve(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
     //dbg!(field);
     let fname = &field.ident.as_ref().unwrap();
     let fname_span = fname.span();
-    let mut skl = Some(quote_spanned!{fname_span=> SectionKindList::PerClient });
+    let mut skl = None;
     let mut method = quote_spanned!{fname_span=> ordinary };
     for attr in &field.attrs {
       let atspan = attr.path.segments.last().unwrap().ident.span();
@@ -80,6 +80,8 @@ pub fn resolve(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
         method = attr.path.to_token_stream();
         if &attr.path == &parse_quote!{ limited } {
           skl = Some(quote_spanned!{atspan=> SectionKindList::Limited });
+        } else if &attr.path == &parse_quote!{ client } {
+          skl = Some(quote_spanned!{atspan=> SectionKindList::PerClient });
         } else if &attr.path == &parse_quote!{ computed } {
           skl = Some(quote_spanned!{atspan=> SectionKindList::None });
         }