[][src]Macro proc_macro_error::filter_macro_errors

macro_rules! filter_macro_errors {
    ($($code:tt)*) => { ... };
}

This macro is supposed to be used at the top level of your proc-macro, the function marked with a #[proc_macro*] attribute. It catches all the errors triggered by span_error!, call_site_error!, and trigger_error. Once caught, it converts it to a proc_macro::TokenStream containing a compile_error! invocation.

See the module-level documentation for usage example