Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
proc_macro_error::filter_macro_errors - Rust
[go: Go Back, main page]

[][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!, MacroError::trigger and MultiMacroErrors. Once caught, it converts it to a proc_macro::TokenStream containing a compile_error! invocation.

See the module-level documentation for usage example