-
Notifications
You must be signed in to change notification settings - Fork 1.7k
len_without_is_empty
doesn't fire in 1.82
#13555
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
It looks like the lint still works, but isn't actually enabled by default any longer. The following will still trigger it:
So I guess this means it was demoted. Does that mean the documentation is wrong, or I'm reading the docs incorrectly? Or does it mean that the lint is intended to be warn by default but isn't? |
It still fires with all channels in the playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=1dc4370a0d768167b637c8e16d902b06 (although none of them use version 1.82 - current beta is 1.83). The lint is still in style and has always been there, so that sounds surprising that it only works with |
Bad luck that I filed this bug on the day that the first 1.83 beta was published :) I agree that it works on the current (1.83) beta. I first found the same problem in a production codebase (actually an I'm having trouble figuring out how to get back to the beta toolchain I was running when I filed this bug. I've tried downloading a bunch of beta-2024-10-xx releases and can't find one that manifests this problem. So maybe there was a glitch on my end that led to me not running the version of clippy that I thought? I'll retest this on stable 1.82 and if it's not there then I'm chasing a ghost and this can be closed. |
I retested on 1.82 and can't reproduce the problem. I don't know why this happened before, but I'm happy it's not an issue on the stable release. Apologies for the false alarm! |
I think #14597 is actually what I was hitting here. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
In rust 1.81, the following code triggers the
clippy::len_without_is_empty
lint. However in the current 1.82 beta, the lint no longer fires. I haven't found any changes that would account for this, and the documentation says this lint is still warn by default.rust 1.81:
rust 1.82:
(no lint output)
Reproducer
(See above)
Version
rustc 1.82.0-beta.6 (763ad520c 2024-10-12)
binary: rustc
commit-hash: 763ad520cc6b831ec98e20f8a8fe85b160ad859d
commit-date: 2024-10-12
host: x86_64-unknown-linux-gnu
release: 1.82.0-beta.6
LLVM version: 19.1.1
Additional Labels
No response
The text was updated successfully, but these errors were encountered: