-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Nightly clippy: manual_unwrap_or
false positive
#13018
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
Comments
Includes a false-positive, rust-lang/rust-clippy#13018.
Includes a false-positive, rust-lang/rust-clippy#13018.
Includes a false-positive, rust-lang/rust-clippy#13018.
Could you extract a minimal example on playground? I tried a bit but I couldn't reproduce the issue. |
It reproduces for me. I think you were using the stable version? Link. I go to Tools -> Clippy to get this result: |
Thanks. I thought clippy on playground always run with nightly version. I did check by switching to nightly channel before. I guess my eyes was failing me. :O |
No problem. Thank you for making the example! |
Uh oh!
There was an error while loading. Please reload this page.
Summary
This is the same as (now fixed) #12564, but now the lint is
manual_unwrap_or
instead ofmanual_unwrap_or_default
.There is a false positive; cargo clippy --fix fails
Lint Name
manual_unwrap_or
Reproducer
I tried this code:
from
https://github.com/ilyagr/jj/blob/4b45dde8c6b2f038cb68c8250d3f7313c4f9cd8c/cli/src/commit_templater.rs#L738-L746
Running
cargo clippy --fix
fails with:Version
This issue was not present in the nightly from a week ago (2024-06-21).
Additional Labels
No response
The text was updated successfully, but these errors were encountered: