-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Update Clippy #96735
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
Update Clippy #96735
Conversation
replacing it with `&(x | y)` is actually more characters
ignore `&x | &y` in unnested_or_patterns replacing it with `&(x | y)` is actually more characters Fixes rust-lang#6973 changelog: [`unnested_or_patterns`] ignore `&x | &y`, nesting would result in more characters
- Create hir_crate_items query which traverses tcx.hir_crate(()).owners to return a hir::ModuleItems - use tcx.hir_crate_items in tcx.hir().items() to return an iterator of hir::ItemId - add par_items(impl Fn(hir::ItemId)) to traverse all items in parallel Signed-off-by: Miguel Guarniz <[email protected]>
Signed-off-by: Miguel Guarniz <[email protected]>
…rednet Fix `unsound_collection_transmute` fixes rust-lang#7706 changelog: Better check size and alignment requirements in `unsound_collection_transmute`
…r=nnethercote Cached stable hash cleanups r? `@nnethercote` Add a sanity assertion in debug mode to check that the cached hashes are actually the ones we get if we compute the hash each time. Add a new data structure that bundles all the hash-caching work to make it easier to re-use it for different interned data structures
split_once was stabilized in 1.52
…nce, r=xFrednet fix comments in test for split_once This PR fixed comments in test. `split_once` was stabilized in 1.52, so I think the comments maybe be wrong. ref: https://doc.rust-lang.org/std/string/struct.String.html#method.split_once thank you in advance. changelog: none
add missing args unque name not needed more descriptive help formatting fixes missing quote
Allow passing `--remove` to `cargo dev setup <SUBCOMMAND>` changelog: none Allows passing `--remove` to `cargo dev setup <SUBCOMMAND>` as an alternative to `cargo dev remove ...` Fixes rust-lang/rust-clippy#8663
Also fixes some incorrect suggestions for rsplitn
Remove overlap between `manual_split_once` and `needless_splitn` changelog: Remove overlap between [`manual_split_once`] and [`needless_splitn`]. Fixes some incorrect `rsplitn` suggestions for [`manual_split_once`] Things that can trigger `needless_splitn` no longer trigger `manual_split_once`, e.g. ```rust s.[r]splitn(2, '=').next(); s.[r]splitn(2, '=').nth(0); s.[r]splitn(3, '=').next_tuple(); ``` Fixes some suggestions: ```rust let s = "should not match"; s.rsplitn(2, '.').nth(1); // old -> Some("should not match") Some(s.rsplit_once('.').map_or(s, |x| x.0)); // new -> None s.rsplit_once('.').map(|x| x.0); s.rsplitn(2, '.').nth(1)?; // old -> "should not match" s.rsplit_once('.').map_or(s, |x| x.0); // new -> early returns s.rsplit_once('.')?.0; ```
…chenkov Overhaul `MacArgs` Motivation: - Clarify some code that I found hard to understand. - Eliminate one use of three places where `TokenKind::Interpolated` values are created. r? `@petrochenkov`
Those lints are trait_duplication_in_bounds and type_repetition_in_bounds. I don't think those can be fixed on the Clippy side alone, but need changes in the compiler. So let's move them to nursery to get the sync through and then fix them on the rustc side. Also adds a regression test that has to be fixed before they can be moved back to pedantic.
Rustup r? `@ghost` changelog: move trait_duplication_in_bounds and type_repetition_in_bounds to nursery temporarily. This could already be reverted before the release. Check the Clippy in the Rust repo beta branch when writing this changelog.
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
@bors r+ p=1 rollup=never |
Bors doesn't see this PR for some reason. Let's reopen and see if that helps. |
@bors ping |
Nope, do we have to sync the bors queue? |
@bors r=Manishearth Synchronized the queue. Now bors sees this PR. |
📌 Commit 463c760 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (30f3860): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
r? @Manishearth