Skip to content
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

Compiler warning for "condition is always true" #342

Closed
pcwalton opened this issue Apr 27, 2011 · 4 comments
Closed

Compiler warning for "condition is always true" #342

pcwalton opened this issue Apr 27, 2011 · 4 comments
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@pcwalton
Copy link
Contributor

while (i >= 0u) cost a morning. We should add a warning for this.

@brson
Copy link
Contributor

brson commented Mar 5, 2012

We have some functions for evaluating const expressions, I believe in ast_util that could be used for this.

@catamorphism
Copy link
Contributor

Also see #1417

@veddan
Copy link
Contributor

veddan commented Oct 24, 2012

Some simple cases can be handled by #3833.

@graydon
Copy link
Contributor

graydon commented Nov 21, 2012

Type limits catches this case. If others show up we're not catching, we can look at them as they arise. Closing.

@graydon graydon closed this as completed Nov 21, 2012
oli-obk added a commit to oli-obk/rust that referenced this issue Sep 19, 2017
validation: check that int, float etc. are not undef
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
Add functions to get password/group file entry
workingjubilee pushed a commit to workingjubilee/rustc that referenced this issue May 10, 2023
Fix {to,from}_array UB when repr(simd) produces padding
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

5 participants