Macro macro_tools::syn_err

source ·
macro_rules! syn_err {
    ( $msg:expr $(,)? ) => { ... };
    ( _, $msg:expr $(,)? ) => { ... };
    ( $span:expr, $msg:expr $(,)? ) => { ... };
    ( $span:expr, $msg:expr, $( $arg:expr ),+ $(,)? ) => { ... };
    ( _, $msg:expr, $( $arg:expr ),+ $(,)? ) => { ... };
}
Expand description

Macro to generate syn error either with span of a syntax tree element or with default one proc_macro2::Span::call_site().

§Basic use-case.

syn_err!( "No attr" );