macro_rules! format_err_spanned {
($tokens:expr, $($msg:tt)*) => { ... };
}Expand description
Creates a syn::Error with the format message and infers the
Span using ToTokens.
§Parameters
- The first argument must implement
quote::ToTokensin order to infer aSpan. - The second argument is a format string.
- The rest are format string arguments.
§Note
On stable Rust this might yield higher quality error span information to the user
than format_err.
- Source:
syn::Error::new_spanned - Tracking issue:
#54725