-
Notifications
You must be signed in to change notification settings - Fork 1.6k
or_fun_call
false positive on enum variants with tuple fields
#9608
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
Thanks for reporting, Do your enums have manual implementation of |
Thank you for your prompt response! The affected enums, including the |
Sadly, yesterday's nightly ( |
The latest Clippy nightlies introduced some regressions that are blocking our builds. Ref: rust-lang/rust-clippy#9608
The latest Clippy nightlies introduced some regressions that are blocking our builds. Ref: rust-lang/rust-clippy#9608
The latest Clippy nightlies introduced some regressions that are blocking our builds. Ref: rust-lang/rust-clippy#9608
Not every nightly ships a new clippy, will check on my side too |
Clippy's stance here has changed.. see rust-lang/rust-clippy#9608
Clippy's stance here has changed.. see rust-lang/rust-clippy#9608 Signed-off-by: Teo Klestrup Röijezon <teo@nullable.se>
Summary
I maintain several Rust projects whose CI workflows run the latest nightly Clippy almost daily. As a result of that, I've discovered that yesterday's nightly, with a commit date of
2022-10-07
, introduced a likely unintended behavior change on theor_fun_call
lint when initializing enum variants with tuple fields:Obviously, in this case no function is being called to initialize the fallback value, so it is a false positive.
Lint Name
or_fun_call
Reproducer
I tried this code:
https://github.com/OptiVorbis/OptiVorbis/archive/49ca18a55293bc5e74b09106c5b09ae56aba6148.zip (OptiVorbis source ZIP)
I saw this happen:
https://github.com/OptiVorbis/OptiVorbis/actions/runs/3209020234/jobs/5245395845 (workflow run logs. Notice the Clippy lints)
I expected to see this happen:
No new lints being triggered, or not new false positives
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: