-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate lint categories and explanations with declare_clippy_lint
#9541
Conversation
☔ The latest upstream changes (presumably #9543) made this pull request unmergeable. Please resolve the merge conflicts. |
7d8da4d
to
8e35afc
Compare
Added back the code block |
8e35afc
to
f99bf05
Compare
☔ The latest upstream changes (presumably #9567) made this pull request unmergeable. Please resolve the merge conflicts. |
I think reducing the code churn may be worth that second of build time. Well done, @Alexendoo! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Thanks for doing this. I'm also not that concerned about the compile time of Clippy here. Not having so many files that can conflict between PRs is definitely worth it IMO.
Changes it to be a proc_macro rather than macro_rules
f99bf05
to
8134566
Compare
Thanks! If any more conflicts crop up I'll keep on top of them |
@bors r+ p=100 Thanks! (Going to bed. If this should fail for some reason, feel free to r=me again) |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
removes document text files that are no longer needed by rust-lang#9541.
chore: remove unnecessary files removes document text files that are no longer needed by #9541. changelog: none r? `@Alexendoo`
removes document text files that are no longer needed by rust-lang#9541.
As of Rust 1.67.0, the cargo-clippy binary now relies on the rustc_private libraries [0], so let's do the RPATH fixup to it too. I've also added a comment to explain the RPATH situation, as it took me a bit to figure out. [0]: rust-lang/rust-clippy#9541
As of Rust 1.67.0, the cargo-clippy binary now relies on the rustc_private libraries [0], so let's do the RPATH fixup to it too. I've also added a comment to explain the RPATH situation, as it took me a bit to figure out. [0]: rust-lang/rust-clippy#9541
This means contributors will no longer have to run
cargo dev update_lints
after changing a lints documentation or its category, which may also mean fewer merge conflicts in generalIt works by swapping
declare_clippy_lint
out for aproc_macro
of the same name. The proc macro emits aLintInfo
alongside the generatedLint
which are gathered intodeclared_lint::LINTS
. The categories/explanations are then read fromdeclared_lint::LINTS
at runtimeThe removal of
src/docs
is split into a separate commit to be more easily ignoredIt is slightly slower though, adding a bit under a second to build time. Less noticeable in full builds or with a slower linker (benchmark uses mold)
r? @flip1995
cc @llogiq for
--explain
changelog: none