From 982eda76003813f23da0f7338f37953d5e4fa945 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 7 Aug 2021 18:50:47 +0100 Subject: [PATCH] config: Set the SKL explicitly for `client` attribute This removes the default SKL, so we will notice if we don't have attributes that set one. Signed-off-by: Ian Jackson --- macros/macros.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/macros/macros.rs b/macros/macros.rs index b6d4bf3..93b1d8a 100644 --- a/macros/macros.rs +++ b/macros/macros.rs @@ -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 }); } -- 2.30.2