You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 lines
497 B

use proc_macro::TokenStream;
use quote::quote;
#[cfg(feature = "doc-generators")]
mod doc_generators;
/// Allows for the doc comments of restrictions to be accessed at runtime.
#[cfg(feature = "doc-generators")]
#[proc_macro_derive(DocumentRestrictions)]
pub fn document_restrictions(item: TokenStream) -> TokenStream {
use doc_generators::Restrictions;
use syn::parse_macro_input;
let restrictions = parse_macro_input!(item as Restrictions);
quote! { #restrictions }.into()
}