1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use proc_macro2::TokenStream; use quote::quote; pub fn get_macro() -> TokenStream { quote! { #[cfg(feature = "full")] macro_rules! full { ($e:expr) => { $e }; } #[cfg(all(feature = "derive", not(feature = "full")))] macro_rules! full { ($e:expr) => { unreachable!() }; } } }