-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Clippy subtree update #125202
Clippy subtree update #125202
Conversation
Searching for a lint on the website will replace all of the dashes with underscores instead of only the first one.
`assigning_clones`: add empty line to doc changelog: none This PR adds, for consistency reasons, an empty line to the example in the doc of the `assigning_clones` lint.
…1995 Fix `FormatArgs` storage when `-Zthreads` > 1 Fixes rust-lang#11886 The initial way I thought of was a little gross so I never opened a PR for it, I thought of a nicer way today that no longer involves any `thread_local`s or `static`s `rustc_data_strucutres::sync::{Lrc, OnceLock}` implement `DynSend` + `DynSync` so we can pass them to the lint passes that need the storage changelog: none r? `@flip1995`
Use the derive feature of `clap` to generate CLI of clippy-dev. Adding new commands will be easier in the future and we get better compile time checking through exhaustive matching.
Same version as most other crates in rustc are using
Some hir cleanups It seemed odd to not put `AnonConst` in the arena, compared with the other types that we did put into an arena. This way we can also give it a `Span` without growing a lot of other HIR data structures because of the extra field. r? compiler
…e-init, r=dswij Don't lint assigning_clones on nested late init locals Fixes rust-lang#12741 changelog: none
Stabilize exclusive_range_pattern (v2) This PR is identical to rust-lang#124459, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F). r? ghost Original PR description: --- Stabilization report: rust-lang#37854 (comment) FCP: rust-lang#37854 (comment) Stabilization was blocked by a lint that was merged here: rust-lang#118879 Documentation PR is here: rust-lang/reference#1484 `@rustbot` label +F-exclusive_range_pattern +T-lang
Current implementation looks for significant drops, that can change the behavior, but that's not enough - value might not have a Drop itself but one of its children might have it. A good example is passing a reference to `PathBuf` to `std::fs::File::open`. There's no benefits to pass `PathBuf` by value, but since clippy can't see `Drop` on `Vec` several layers down it complains forcing pass by value and making it impossible to use the same name later. New implementation only looks at copy values or values created inplace so existing variable will never be moved but things that take a string reference created and value is created inplace `&"".to_owned()` will make it to suggest to use `"".to_owned()` still. Fixes rust-lang/rust-clippy#12454
…xendoo Type safe CLI implementation for clippy-dev Use the derive feature of `clap` to generate CLI of clippy-dev. Adding new commands will be easier in the future and we get better compile time checking through exhaustive matching. --- I think I tested everything locally. But I would appreciate if the reviewer could go over it again, so that everything keeps working. changelog: none
…et,GuillaumeGomez Allow more attributes in `clippy::useless_attribute` Fixes rust-lang#12753 Fixes rust-lang#4467 Fixes rust-lang#11595 Fixes rust-lang#10878 changelog: [`useless_attribute`]: Attributes allowed on `use` items now include `ambiguous_glob_exports`, `hidden_glob_reexports`, `dead_code`, `unused_braces`, and `clippy::disallowed_types`.
This avoids event spans that would otherwise cause crashes, since an End's span covers the range of the tag (which will be earlier than the line break within the tag).
doc_lazy_continuation: do not warn on End events ``` changelog: none ``` This avoids event spans that would otherwise cause crashes, since an End's span covers the range of the tag (which will be earlier than the line break within the tag).
(sorry, should have notified people, I'm in the wilderness with very little internet) I think it's fine to wait for review just as a matter of consistency but I'm open to changing it. We all see these PRs anyway due to the team cc. |
☔ The latest upstream changes (presumably #125331) made this pull request unmergeable. Please resolve the merge conflicts. |
Add new lint `while_float` This PR adds a nursery lint that checks for while loops comparing floating point values. changelog: ``` changelog: [`while_float`]: Checks for while loops comparing floating point values. ``` Fixes rust-lang#758
40fe6ca
to
bb1481a
Compare
This includes rust-lang/rust-clippy#12818, which should fix CI. |
@bors r+ |
…nishearth Clippy subtree update r? `@Manishearth`
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
rustfmt test failed?? |
☀️ Test successful - checks-actions |
Finished benchmarking commit (72d8d8d): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary -2.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary 1.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 670.302s -> 670.887s (0.09%) |
r? @Manishearth