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

Lint for loops that will never run more than once #1290

Closed
nox opened this issue Oct 23, 2016 · 5 comments
Closed

Lint for loops that will never run more than once #1290

nox opened this issue Oct 23, 2016 · 5 comments
Labels
A-lint Area: New lints E-medium Call for participation: Medium difficulty level problem and requires some initial experience. L-unnecessary Lint: Warn about unnecessary code T-middle Type: Probably requires verifiying types

Comments

@nox
Copy link

nox commented Oct 23, 2016

Clippy should warn about loop { return; }.

@mcarton mcarton added good-first-issue These issues are a good way to get started with Clippy T-AST Type: Requires working with the AST A-lint Area: New lints L-unnecessary Lint: Warn about unnecessary code labels Oct 23, 2016
@Havvy
Copy link

Havvy commented Oct 28, 2016

I'm going to take my hand at this.

@mcarton
Copy link
Member

mcarton commented Oct 28, 2016

@Havvy Thanks! Feel free to ask if you have any question.

@Havvy
Copy link

Havvy commented Nov 3, 2016

Blocked on rust-lang/rust#37535

Well, theoretically anyways. I more want those methods there because they then have a guarantee that each node will have its NodeIndex with it in the iterator.

@Havvy
Copy link

Havvy commented Nov 3, 2016

Also, I'm using a CFG analysis for this, not AST. So T-AST is wrong. As is E-easy. E-medium perhaps.

@oli-obk oli-obk added E-medium Call for participation: Medium difficulty level problem and requires some initial experience. T-middle Type: Probably requires verifiying types and removed good-first-issue These issues are a good way to get started with Clippy T-AST Type: Requires working with the AST labels Nov 3, 2016
@oli-obk oli-obk removed the C-assigned label May 8, 2017
@camsteffen
Copy link
Contributor

Resolved by #1549.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints E-medium Call for participation: Medium difficulty level problem and requires some initial experience. L-unnecessary Lint: Warn about unnecessary code T-middle Type: Probably requires verifiying types
Projects
None yet
Development

No branches or pull requests

5 participants