-
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
False positive assertions_on_constants #5064
Comments
Uhm, I feel this isn't false positive, but expected behavior. The more appropriate approach is to use |
It is expected behavior, how the lint is currently written. A possible change would be to allow comparisons in asserts (only The question now is: Is the lint still useful once comparisons are not linted? Because then it pretty much only lints on literal |
Maybe continue to lint in the |
Duplicate of #8159 , which has some more details. |
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=40fdbfbe2885aeb26531533ee38b450f
While expression can be compile-time evaluated to
true
, it can make sense to be sure thatFoo
will always be smaller thatBar
.The text was updated successfully, but these errors were encountered: