Skip to content

Mark all format-like macros for Clippy#7689

Open
nyurik wants to merge 1 commit intoslint-ui:masterfrom
nyurik:clippy
Open

Mark all format-like macros for Clippy#7689
nyurik wants to merge 1 commit intoslint-ui:masterfrom
nyurik:clippy

Conversation

@nyurik
Copy link
Copy Markdown
Contributor

@nyurik nyurik commented Feb 21, 2025

Allows Clippy to lint format-like usage of non-standard macros

See https://doc.rust-lang.org/nightly/clippy/attribs.html#clippyformat_args

@nyurik
Copy link
Copy Markdown
Contributor Author

nyurik commented Feb 21, 2025

It seems this is due to rust-lang/rust#98291 - it might mean the actual macros are being declared incorrectly by Slint, but there is no warning about it because of a bug in the compiler? Or that the compiler simply doesn't have a good error message for this. Or ... TBD.

@ogoffart
Copy link
Copy Markdown
Member

Thanks for the PR, looks nice.
Too bad this causes compilation error. My intuition tells me the compiler think that #[clippy::...] is a macro.
Perhaps it could be worked around by adding a #[cfg_attr(clippy, ...)] or something like this?

@ogoffart
Copy link
Copy Markdown
Member

@nyurik Would you like to try with #[cfg_attr(clippy, clippy::format_args)] ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants