-
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
Fix [unnecessary_lazy_eval
] when type has significant drop
#9750
Conversation
r? @Manishearth (rust-highfive has picked a reviewer for you, use r? to override) |
cc @rust-lang/clippy thoughts? |
I would probably go with the rustc "significant" drop. In most cases, false negatives are better than false positives. But I have no strong opinion on this. |
Yeah, the other benefit of following the rustc definition is that we'll be updated automatically if it ever changed. |
Just to be clear, do you think the current fix would be enough applied as-is? (Documentation apart) |
27540a7
to
ed183ee
Compare
unnecessary_lazy_eval
] when type has significant dropunnecessary_lazy_eval
] when type has significant drop
Should be good to go 👍 |
r? @xFrednet |
LGTM, thank you for the update and in general all the work you currently do around Clippy. It's really a big help! @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
fix for #9427 (comment)
However current implementation gives too many false positive, rending the lint almost useless.
I don't know what's the best way to check if a type has a "significant" drop (in the common meaning, not the internal rustc one, for example Option<(u8, u8)> should not be considered significant)
changelog: Fix [
unnecessary_lazy_eval
] when type has significant drop