-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Issue with map(clone) on Option in latest nightly #12148
Comments
I don't think it was fixed yet, still happening on latest nightly:
|
The fix is not in nightly yet. Clippy gets synced with upstream rust only every ~14 days, so it'll be in nightly on the 25th. (The fix was merged 5 days ago but the last sync was on the 11th) |
Still happens to me on the latest nightly |
Upstream PR for the sync: rust-lang/rust#120345, looks like it didn't get merged in time to be in today's nightly. Once that PR is merged, it should be in the next day's nightly. You can also verify that this is fixed by cloning the clippy repo locally and running |
…Manishearth Clippy subtree update r? `@Manishearth` Closes rust-lang/rust-clippy#12148
Rollup merge of rust-lang#120345 - flip1995:clippy-subtree-update, r=Manishearth Clippy subtree update r? `@Manishearth` Closes rust-lang/rust-clippy#12148
Clippy subtree update r? `@Manishearth` Closes rust-lang#12148
Clippy subtree update r? `@Manishearth` Closes rust-lang/rust-clippy#12148
Clippy subtree update r? `@Manishearth` Closes rust-lang/rust-clippy#12148
Summary
I'm getting many many clippy warnings in the latest nightly.
They all stem from the fact that I'm using the
map
method on anOption
to invoke a clone method on some intenral part of the value, but not on the entire Option value. Clippy tells me to just clone the entire option variable.Here are a few examples
Reproducer
I tried this code:
<code>
I expected to see this happen:
Instead, this happened:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: