disable_macro 0.3.1

This simple crate lets us disable a block of code with an attribute #[disable].
Documentation
1
2
3
4
5
6
7
8
use proc_macro::TokenStream;
use syn::{parse_macro_input, ItemFn};

#[proc_macro_attribute]
pub fn disable(_attr: TokenStream, item: TokenStream) -> TokenStream {
    // Return an empty TokenStream to completely remove the annotated item
    TokenStream::new()
}