unhygienic/
lib.rs

1#![no_std]
2
3//! A dead simple macro to erase macro hygiene. This stringifies the input, then reparses it in
4//! the caller's context (with a few warts.)
5
6#[macro_use]
7extern crate proc_macro_hack;
8
9#[allow(unused_imports)]
10#[macro_use]
11extern crate unhygienic_impl;
12#[doc(hidden)]
13pub use unhygienic_impl::*;
14
15proc_macro_expr_decl! {
16    /// Erases the hygiene from its parameters, causing it to use the context of the call site.
17    /// The input must be an expression.
18    unhygienic! => unhygienic_impl
19}
20
21proc_macro_item_decl! {
22    /// Erases the hygiene from its parameters, causing it to use the context of the call site.
23    /// The input must be zero, one, or more items.
24    unhygienic_item! => unhygienic_item_impl
25}