-
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 #120806
Merged
Merged
Clippy subtree update #120806
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
Return with a question mark was triggered in situations where the `?` desuraging was performing error conversion via `Into`/`From`. The desugared `?` produces a match over an expression with type `std::ops::ControlFlow<B,C>` with `B:Result<Infallible, E:Error>` and `C:Result<_, E':Error>`, and the arms perform the conversion. The patch adds another check in the lint that checks that `E == E'`. If `E == E'`, then the `?` is indeed unnecessary. changelog: False Positive: `needless_return_with_question_mark` when implicit Error Conversion occurs.
… lint emit warning
There are cases where the closure call is needed in some macros, this in particular occurs when the closure has parameters. To handle this case, we allow the lint when there are no parameters in the closure, or the closure is outside a macro invocation. fixes: rust-lang#11274, rust-lang#1553 changelog: FP: [`redundant_closure_call`] when closures with parameters are passed in macros.
`unescape_literal` becomes `unescape_unicode`, and `unescape_c_string` becomes `unescape_mixed`. Because rfc3349 will mean that C string literals will no longer be the only mixed utf8 literals.
Add lint configuration for `modulo_arithmetic` Collect meta-data
remove StructuralEq trait The documentation given for the trait is outdated: *all* function pointers implement `PartialEq` and `Eq` these days. So the `StructuralEq` trait doesn't really seem to have any reason to exist any more. One side-effect of this PR is that we allow matching on some consts that do not implement `Eq`. However, we already allowed matching on floats and consts containing floats, so this is not new, it is just allowed in more cases now. IMO it makes no sense at all to allow float matching but also sometimes require an `Eq` instance. If we want to require `Eq` we should adjust rust-lang#115893 to check for `Eq`, and rule out float matching for good. Fixes rust-lang#115881
Avoid linting redundant closure when callee is marked `#[track_caller]` Fixes rust-lang#12199 Not sure if there's a nicer way to detect functions marked `#[track_caller]` other than by just looking at its attributes 🤔 changelog: [`redundant_closure`]: [`redundant_closure_for_method_calls`]: avoid linting closures where the function being called is marked `#[track_caller]`
Co-authored-by: y21 <30553356+y21@users.noreply.github.com>
…lyxyas Warn if an item coming from more recent version than MSRV is used Part of rust-lang/rust-clippy#6324. ~~Currently, the lint is not working for the simple reason that the `stable` attribute is not kept in dependencies. I'll send a PR to rustc to see if they'd be okay with keeping it.~~ EDIT: There was actually a `lookup_stability` function providing this information, so all good now! cc `@epage` changelog: create new [`incompatible_msrv`] lint
…1-dead RFC 3349 precursors Some cleanups I found while working on RFC 3349 that are worth landing separately. r? `@fee1-dead`
…Manishearth Clippy subtree update r? `@Manishearth` Closes rust-lang/rust-clippy#12148
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Feb 9, 2024
@bors retry |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Feb 9, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 9, 2024
…Manishearth Clippy subtree update r? `@Manishearth`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 9, 2024
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#120308 (core/time: avoid divisions in Duration::new) - rust-lang#120589 (std::thread::available_parallelism merging linux/android/freebsd version) - rust-lang#120596 ([rustdoc] Correctly generate path for non-local items in source code pages) - rust-lang#120672 (std::thread update freebsd stack guard handling.) - rust-lang#120693 (Invert diagnostic lints.) - rust-lang#120704 (A drive-by rewrite of `give_region_a_name()`) - rust-lang#120806 (Clippy subtree update) - rust-lang#120809 (Use `transmute_unchecked` in `NonZero::new`.) - rust-lang#120817 (Fix more `ty::Error` ICEs in MIR passes) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 9, 2024
…nishearth Clippy subtree update r? `@Manishearth`
💥 Test timed out |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Feb 9, 2024
@bors retry |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Feb 9, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 9, 2024
…iaskrgr Rollup of 11 pull requests Successful merges: - rust-lang#120351 (Implement SystemTime for UEFI) - rust-lang#120354 (improve normalization of `Pointee::Metadata`) - rust-lang#120776 (Move path implementations into `sys`) - rust-lang#120790 (better error message on download CI LLVM failure) - rust-lang#120806 (Clippy subtree update) - rust-lang#120815 (Improve `Option::inspect` docs) - rust-lang#120822 (Emit more specific diagnostics when enums fail to cast with `as`) - rust-lang#120827 (Print image input file and checksum in CI only) - rust-lang#120836 (hide impls if trait bound is proven from env) - rust-lang#120844 (Build DebugInfo for async closures) - rust-lang#120851 (Remove duplicate release note) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 9, 2024
…nishearth Clippy subtree update r? `@Manishearth`
@bors retry yield rollup |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 9, 2024
…iaskrgr Rollup of 11 pull requests Successful merges: - rust-lang#120351 (Implement SystemTime for UEFI) - rust-lang#120354 (improve normalization of `Pointee::Metadata`) - rust-lang#120776 (Move path implementations into `sys`) - rust-lang#120790 (better error message on download CI LLVM failure) - rust-lang#120806 (Clippy subtree update) - rust-lang#120815 (Improve `Option::inspect` docs) - rust-lang#120822 (Emit more specific diagnostics when enums fail to cast with `as`) - rust-lang#120827 (Print image input file and checksum in CI only) - rust-lang#120836 (hide impls if trait bound is proven from env) - rust-lang#120844 (Build DebugInfo for async closures) - rust-lang#120851 (Remove duplicate release note) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 9, 2024
Rollup merge of rust-lang#120806 - flip1995:clippy-subtree-update, r=Manishearth Clippy subtree update r? `@Manishearth`
wut.. |
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Feb 26, 2024
…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