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

unused_labels should be reported as warnings #66324

Closed
BartMassey opened this issue Nov 12, 2019 · 3 comments · Fixed by #66325
Closed

unused_labels should be reported as warnings #66324

BartMassey opened this issue Nov 12, 2019 · 3 comments · Fixed by #66325
Labels
A-lints 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. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@BartMassey
Copy link
Contributor

A long while back there was Issue #50751 which pointed out that the compiler was not linting for unused break labels. This resulted after a lot of fantastic hard work in PR #50763 which added the unused_labels lint.

At the time, the lint was set to allow by default. The consensus was that there would need to be a review and a crater run before it was changed to warn. Issue #50751 was closed without this happening, and this is where we stand today.

I'd love to see this changed to warn by default. Any chance that could happen?

@Centril
Copy link
Contributor

Centril commented Nov 12, 2019

Seems reasonable; want to file a PR? cc @rust-lang/lang

@jonas-schievink jonas-schievink added A-lints 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. T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Nov 12, 2019
@BartMassey
Copy link
Contributor Author

Working…

@BartMassey
Copy link
Contributor Author

OK, PR #66325 is in the queue. Let me know if I need to do something different. Thanks!

Centril added a commit to Centril/rust that referenced this issue Dec 7, 2019
Change unused_labels from allow to warn

Fixes rust-lang#66324, making the unused_labels lint warn instead of allow by default. I'm told @rust-lang/lang will need to review this, and perhaps will want to do a crater run.
Centril added a commit to Centril/rust that referenced this issue Dec 8, 2019
Change unused_labels from allow to warn

Fixes rust-lang#66324, making the unused_labels lint warn instead of allow by default. I'm told @rust-lang/lang will need to review this, and perhaps will want to do a crater run.
@bors bors closed this as completed in 34a45a5 Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints 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. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants