-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 #136645
Merged
Merged
Clippy subtree update #136645
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Counting in bytes for a pointer to `u8` is legitimate and must not trigger the lint. Also, this prevents linting the `{std,core}::ptr::write_bytes` as it manipulates bytes.
changelog: [`needless_option_take`]: add autofix
…estion (rust-lang#13990) fix rust-lang#13959 The current implementation of the `write_literal` and `print_literal` lint performs escaping for the second argument of `write!` ,`writeln!`, `print!` and `println!` of the suggestion by first replacing `"` with `\"`, and then replacing `\` with `\\`. Performing these replacements in this order may lead to unnecessary backslashes being added if the original code contains `"` (e.g. `"` -> `\\"`), potentially resulting in a suggestion that causes the code to fail to compile. In the issue mentioned above, it’s suggested to use raw strings as raw strings, but implementing this would require an ad-hoc change to the current implementation, so it has been deferred. (I'll implement this in another PR) changelog: [`write_literal`]: fix incorrect escaping of suggestions changelog: [`print_literal`]: fix incorrect escaping of suggestions
…#13894) Closes rust-lang#11434 by moving `format_push_string` and `format_collect` to pedantic. changelog: Move `format_push_string` and `format_collect` to pedantic
…d-in-new-solver, r=lcnr Do not consider child bound assumptions for rigid alias r? lcnr See first commit for the important details. For second commit, I also stacked a somewhat opinionated name change, though I can separate that if needed. Fixes rust-lang/trait-system-refactor-initiative#149
Refactor FnKind variant to hold &Fn Pulling the change suggested in rust-lang#128045 to reduce the impact of changing `Fn` item. r? `@oli-obk`
Removing the semicolon of the last statement of an expressionless block may change the block type even if the statement's type is `()`. If the block type is `!` because of a systematic early return, typing it as `()` may make it incompatible with the expected type for the block (to which `!` is cast).
changelog: [`redundant_else`]: autofix for some cases `redundant_else` can be fixed automatically.
…-lang#14105) Fix rust-lang#14096 changelog: [`redundant_closure_for_method_calls`]: repeat generic args in suggestion
Commit 2550530 has extended the `precedence` lint to include bitmasking and shift operations. The lint is warn by default, and this generates many hits, especially in embedded or system code, where it is very idiomatic to use expressions such as `1 << 3 | 1 << 5` without parentheses. This commit splits the recent addition into a new lint, which is put into the "restriction" category, while the original one stays in "complexity", because mixing bitmasking and arithmetic operations is less typical.
Co-authored-by: FedericoBruzzone <[email protected]>
Turns out I was completely overcomplicating myself, there was no need for an external tool such as becnhv2 or even the original becnh, we already had the benchmarking infrastructure right under our noses! This PR implements a new **lintcheck** option called --perf, using it as a flag will mean that lintcheck builds Clippy as a release package and hooks perf to it. The realization that lintcheck is already 90% of what a benchmarking tool needs came to me in a dream.
…ang#14051) close rust-lang#6436 changelog: [`return_and_then`]: new lint
Counting in bytes for a pointer to `u8` is legitimate and must not trigger the lint. Also, this prevents linting the `{std,core}::ptr::write_bytes` as it manipulates bytes. Fix rust-lang#6590 changelog: [`size_of_in_element_count`]: do not lint if the pointee type is `u8`
[RFC](https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md#lint-audit-and-categories) has more groups so add them changelog: none
changelog: none
r? @ghost changelog: none
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
@bors r+ p=1 |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 6, 2025
…Manishearth Clippy subtree update r? `@Manishearth`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 6, 2025
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#133925 (disallow `repr()` on invalid items) - rust-lang#135549 (Document some safety constraints and use more safe wrappers) - rust-lang#136069 (Simplify slice indexing in next trait solver) - rust-lang#136152 (Stabilize `map_many_mut` feature) - rust-lang#136219 (Misc. `rustc_hir` cleanups 🧹) - rust-lang#136580 (Couple of changes to run rustc in miri) - rust-lang#136636 (Couple of minor cleanups to the diagnostic infrastructure) - rust-lang#136645 (Clippy subtree update) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 7, 2025
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#133925 (disallow `repr()` on invalid items) - rust-lang#136069 (Simplify slice indexing in next trait solver) - rust-lang#136152 (Stabilize `map_many_mut` feature) - rust-lang#136219 (Misc. `rustc_hir` cleanups 🧹) - rust-lang#136580 (Couple of changes to run rustc in miri) - rust-lang#136636 (Couple of minor cleanups to the diagnostic infrastructure) - rust-lang#136645 (Clippy subtree update) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 7, 2025
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#133925 (disallow `repr()` on invalid items) - rust-lang#136069 (Simplify slice indexing in next trait solver) - rust-lang#136152 (Stabilize `map_many_mut` feature) - rust-lang#136219 (Misc. `rustc_hir` cleanups 🧹) - rust-lang#136580 (Couple of changes to run rustc in miri) - rust-lang#136636 (Couple of minor cleanups to the diagnostic infrastructure) - rust-lang#136645 (Clippy subtree update) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 7, 2025
Rollup merge of rust-lang#136645 - flip1995:clippy-subtree-update, r=Manishearth Clippy subtree update r? `@Manishearth`
carolynzech
added a commit
to carolynzech/kani
that referenced
this pull request
Feb 10, 2025
- clippy subtree update, c.f. rust-lang/rust#136645
carolynzech
added a commit
to carolynzech/kani
that referenced
this pull request
Feb 10, 2025
- clippy subtree update, c.f. rust-lang/rust#136645
github-merge-queue bot
pushed a commit
to model-checking/kani
that referenced
this pull request
Feb 11, 2025
Upgrade toolchain to 2/10. I **highly recommend** reviewing this PR commit-by-commit. The description in each commit message links to the upstream PRs that prompted those particular changes. ## Callouts - 2/1 had a lot of formatting changes. I split the commits for that day into formatting changes and functionality changes accordingly. - 2/5 introduced a regression in our delayed UB instrumentation, so I made a new fixme test. See #3881 for details. ## Culprit PRs: rust-lang/rust#134424 rust-lang/rust#130514 rust-lang/rust#135748 rust-lang/rust#136590 rust-lang/rust#135318 rust-lang/rust#135265 rust-lang/rust@bcb8565 rust-lang/rust#136471 rust-lang/rust#136645 Resolves #3863 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Feb 20, 2025
…Manishearth Clippy subtree update r? `@Manishearth`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
r? @Manishearth