-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
FP redundant_clone: Box #10517
Comments
This seems to be a regression, at least on beta, there is no such warning, hm. |
Hmm, |
Ooh, I bet this broke in rust-lang/rust#108958 cc @clubby789 |
@rustbot claim |
Hmm. I'm not sure how this specifically could have broken it - that PR pretty much just removes it from match arms, the expression itself hasn't emitted since I removed it in rust-lang/rust#108516. I'll try a bisect searched nightlies: from nightly-2023-03-15 to nightly-2023-03-17 bisected with cargo-bisect-rustc v0.6.5Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc 2023-03-15 --end 2023-03-17 --script=./script.sh -vv |
Oh my bad then, sorry 😅 this looked like the obvious contender to me since it removed box stuff and I thought maybe it removed a "saveguard" when linting against boxes... |
I remember seeing this come up before, but can't find the issue now. This isn't a false positive as the new value isn't used, but the suggestion should be to remove the whole binding. |
I think this issue's root cause is same as this (see my cross post: #10577 (comment))
this is fine with then again, i think this pr is suspicious: rust-lang/rust#108944 |
Move `redundant_clone` to `nursery` changelog: [`redundant_clone`]: Move to `nursery` A bunch of FPs in `redundant_clone` have sprung up after upstream MIR changes: rust-lang/rust#108944 - #10870 - #10577 - #10545 - #10517 r? `@flip1995`
Summary
.
Lint Name
redundant_clone
Reproducer
I tried this code:
I saw this happen:
But
does not compile
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: