syn_err

Macro 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" );