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