aboutsummaryrefslogtreecommitdiff
path: root/syn/codegen/src/full.rs
blob: a41003189f6f191ff67234eb9e4807ed20e600c4 (plain)
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!()
            };
        }
    }
}