You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
catches common errors like using format-like macro: my_macro!("{}", foo) not being replaceable by my_macro!("{foo}") (i.e. it is no longer requires a single comma to always be present)
What it does
Try to catch bad macro param patterns, and suggest better ones:
<anything>, $($e:expr),*
with<anything> $(, $e:expr)* $(,)?
<anything>, $($e,)*
with<anything> $(, $e)*
$(,)?
. See also Lint macro definitions that don't allow trailing commas #1848Lint Name
bad_macro_param_pattern
Category
suspicious
Advantage
my_macro!("{}", foo)
not being replaceable bymy_macro!("{foo}")
(i.e. it is no longer requires a single comma to always be present)Drawbacks
possible formatting issues on auto-fix
Example
Could be written as:
The text was updated successfully, but these errors were encountered: