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
Now that #[clippy::format_args] has been released, should we delete the FORMAT_MACRO_DIAG_ITEMS list, and instead tag all relevant macros with the new attribute in the stdlib?
Benefits
Keep each macro's metadata next to the declaration.
No need to track when new relevant macros are written
Improves discoverability of the #[clippy::format_args], as any developer writing format-like macro will see it in the declaration
The text was updated successfully, but these errors were encountered:
Since 1.85, Clippy [supports](See https://doc.rust-lang.org/nightly/clippy/attribs.html#clippyformat_args) attribute-based discovery of the `format!`-compatible macros, i.e. macros whose trailing arguments can be passed to `format_args!` as is.
Tagging core library with the same attribute will allow clippy to stop maintaining a separate list of format-like macros - allowing Clippy to validate macro usage for all lints that work on format arguments. See also rust-lang/rust-clippy#14267
nyurik
added a commit
to nyurik/rust
that referenced
this issue
Feb 21, 2025
Since 1.85, Clippy [supports](See https://doc.rust-lang.org/nightly/clippy/attribs.html#clippyformat_args) attribute-based discovery of the `format!`-compatible macros, i.e. macros whose trailing arguments can be passed to `format_args!` as is.
Tagging core library with the same attribute will allow clippy to stop maintaining a separate list of format-like macros - allowing Clippy to validate macro usage for all lints that work on format arguments. See also rust-lang/rust-clippy#14267
Now that
#[clippy::format_args]
has been released, should we delete theFORMAT_MACRO_DIAG_ITEMS
list, and instead tag all relevant macros with the new attribute in the stdlib?Benefits
#[clippy::format_args]
, as any developer writing format-like macro will see it in the declarationThe text was updated successfully, but these errors were encountered: