is_not 0.1.0

A procedural macro much like #[cfg(...)] that can be re-exported from a library based on enabled features
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
extern crate proc_macro;

use proc_macro::TokenStream;

/// Returns the original token stream.
#[proc_macro_attribute]
pub fn is(_attributes: TokenStream, input: TokenStream) -> TokenStream {
    input
}

/// Returns an empty token stream.
#[proc_macro_attribute]
pub fn not(_attributes: TokenStream, _input: TokenStream) -> TokenStream {
    TokenStream::new()
}