-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
[beta] Clippy backport #124369
Merged
Merged
[beta] Clippy backport #124369
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
|
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Apr 25, 2024
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This was referenced Apr 25, 2024
Merged
Merged
Do we also need to backport 5d66521 ? I think without that one we'll run into #123465 (comment) again |
y21
reviewed
Apr 25, 2024
don't lint [`mixed_attributes_style`] when mixing docs and other attrs fixes: rust-lang#12435 fixes: rust-lang#12436 fixes: rust-lang#12530 --- changelog: don't lint [`mixed_attributes_style`] when mixing different kind of attrs; and move it to late pass;
…logiq Move `mixed_attributes_style` to style > It currently is in suspicious. I wouldn't say that the linted code is "most likely wrong or useless" [...] > 😅 I would still argue that this doesn't belong in the suspicious group, but rather in the style group. These are some good points made [on zulip](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/mixed_attributes_style.20on.20outlined.20modules/near/429823328). ---- changelog: Move [`mixed_attributes_style`] to the `style` category
Fix infinite loop in `cast_sign_loss` when peeling unwrap method calls Fixes rust-lang#12506 The lint wants to peel method calls but didn't actually reassign the expression, leading to an infinite loop. ---- changelog: Fix infinite loop in [`cast_sign_loss`] when having two chained `.unwrap()` calls
avoid an ICE in `ptr_as_ptr` when getting the def_id of a local Fixes rust-lang#12616 `Res::def_id` can panic, so avoid calling it in favor of `opt_def_id`, so we can gracefully handle resolutions that don't have a `DefId` (e.g. local variables) and get a false negative in the worst case, rather than an ICE changelog: Fix ICE in [`ptr_as_ptr`] when the cast expression is a function call to a local variable
flip1995
force-pushed
the
clippy-backport
branch
from
April 25, 2024 14:29
90d47e4
to
199c298
Compare
Done. Let's hope CI passes now. |
@bors r+ rollup=never p=1 |
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
Apr 27, 2024
☀️ Test successful - checks-actions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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? @Mark-Simulacrum
Backports:
mixed_attributes_style
] when mixing docs and other attrs rust-clippy#12486mixed_attributes_style
to style rust-clippy#12572cast_sign_loss
when peeling unwrap method calls rust-clippy#12508ptr_as_ptr
when getting the def_id of a local rust-clippy#12617The first one is a bit bigger as usual for a backport. But it fixes a major issue with this lint that we overlooked. So I think this is worth it. After that was merged into nightly, there were no new issues opened about this lint, so IMO this is safe to backport to
beta
and put into stable.