New lint: `borrow_mutable_copy`
This detects when the result of a block, with a Copy type, is borrowed mutably. The user might not be aware that using a block will borrow a copy instead of the value expression itself.
changelog: [borrow_mutable_copy]: new lint
Close rust-lang/rust-clippy#13967
r? @blyxyas
rustbot has assigned @blyxyas. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
Rebased
Rebased
r? @clippy
Rebased
Rebased
@flip1995 Anything else needs to be done?
I guess the FCP on Zulip. Feel free to start that :)
FCP opened on https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/FCP.3A.20copy_then_borrow_mut
:umbrella: The latest upstream changes (possibly 8eed35023f26bc45ab86d5b8f080c4025faa58cf) made this pull request unmergeable. Please resolve the merge conflicts.
Rebased
Any blocker for this one?
Rebased and updated the Clippy version to 1.88.
Rebased and updated the Clippy version to 1.89.
:umbrella: The latest upstream changes (possibly 7bac114c8645d40291502c0d8028ffd16c7e8c01) made this pull request unmergeable. Please resolve the merge conflicts.
I'll do two successive pushes: one to rebase on master, with no change, and one with the changes, so that it is easier to check what has been modified.
Reminder, once the PR becomes ready for a review, use @rustbot ready.
I've put it back into suspicious, with MaybeIncorrect applicability.
@rustbot ready
:umbrella: The latest upstream changes (possibly 7ab910f9355e739e3057fec1eea293637473304a) made this pull request unmergeable. Please resolve the merge conflicts.
Rebased
:umbrella: The latest upstream changes (possibly d7b27ecbf319446dd9563a433e9694fa3bcd0d8c) made this pull request unmergeable. Please resolve the merge conflicts.
Rebased
:umbrella: The latest upstream changes (possibly b379d54c22f9f6b9577075d7f89645ac2498c931) made this pull request unmergeable. Please resolve the merge conflicts.
Should I close this or will it be merged?
Updated Rust version to 1.90.0.
:umbrella: The latest upstream changes (possibly 368b2355797b13511776f0a35ec4864468b87ece) made this pull request unmergeable. Please resolve the merge conflicts.
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.
Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.
r? clippy
:umbrella: The latest upstream changes (possibly #15731) made this pull request unmergeable. Please resolve the merge conflicts.