[−][src]Attribute Macro proc_macro_error::proc_macro_error
#[proc_macro_error]
Either this attribute or proc_macro_error::entry_point MUST be present
on the top level of your macro.
This attribute helps you build the right entry_point invocation while
keeping the indentation level.
Syntax
#[proc_macro_error] or #[proc_macro_error(settings...)], where settings...
is a comma-separated list of:
-
assert_unwind_safe:Tells
proc_macro_errorthat the code passed toproc_macro_error::entry_pointshould we wrapped withAssertUnwindSafe. -
allow_not_macro:By default, the attribute checks that it's applied to a proc-macro. If none of
#[proc_macro],#[proc_macro_derive]nor#[proc_macro_attribute]are present it will panic. It's the intention - this crate is supposed to be used only with proc-macros. By applying this setting you're bypassing this check, useful in certain circumstances.