unhygienic!() { /* proc-macro */ }
Expand description

Macro to erase macro hygiene.

Example

use unhygienic2::unhygienic;

macro_rules! declare {
    ($exp:expr) => {
        unhygienic! {
            fn func() -> i32 {
                let a = 5;

                $exp
            }
        }
    }
}

declare!({ a + 1 });

fn main() {
    assert_eq!(func(), 6);
}