-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Apply clippy::uninlined_format_args fixes #102804
Conversation
r? @jyn514 (rust-highfive has picked a reviewer for you, use r? to override) |
|
The Miri subtree was changed cc @rust-lang/miri
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
Changes rustc_apfloat. rustc_apfloat is currently in limbo and you almost certainly don't want to change it (see #55993). cc @eddyb Some changes occurred in src/tools/cargo cc @ehuss Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This is not a good idea. It creates a lot of churn, has dubious benefit, and we have a policy of not enforcing clippy lints; if they're important enough to be gated in CI, the lints should be part of rustc proper.
There isn't a way; x.py clippy isn't officially supported. |
@jyn514 , I didn't know about the policy, thanks for the explanation :) |
I think in the past, pull requests to fix clippy lints have been accepted, at least to Also btw Last, there is conflict potential when it comes to error due to the ongoing migration to translatable error messages. In many ways I think the new API can be improved (structs are bad design IMO), but there are still PRs open to migrate away from |
Yes, but they've been accepted on their own merit, not because they fix a lint. I don't think these changes stand on their own; if nothing else the churn is a massive pain to review, and it makes git blame less useful in the future. Put another way, I think it's fine to discover issues because of a lint, but not to decide they're an issue in the first place because of a lint. |
@jyn514 I think "code is easier to read" is a benefit in of itself. Granted that it should be trivial to review, and this PR is clearly too messy to merge (my bad). Assuming it is easier to read after the cleanup, I think it would be good to start a slow process of cleaning up the code, one easy-to-review chunk at a time. |
This is the result of running
clippy::uninlined_format_args
lint. Currently the lint is inpedantic
, but there are plans/hopes to move it tostyle
.How can I add this specific lint to the current build/CI tools, or is this not possible? It would be ideal not to make the lint as the default style and then end up with hundreds of changes in an unrelated PR due to CI requirements.
Locally, I ran this to generate the changes. Not ideal because it has produced a number of compilation errors.