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

warnings is both a lint check and lint group #45004

Closed
sanmai-NL opened this issue Oct 3, 2017 · 2 comments
Closed

warnings is both a lint check and lint group #45004

sanmai-NL opened this issue Oct 3, 2017 · 2 comments
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.

Comments

@sanmai-NL
Copy link

sanmai-NL commented Oct 3, 2017

It appears impossible to deny all warnings and then warn for specific warning lint checks using rustc CLI parameters. One clear inconsistency that could be connected to this issue is that warnings is both a ‘lint check’ and a ‘lint group’.

rustc -W help
Lint checks provided by rustc:


                                         name  default  meaning
                                         ----  -------  -------
...
                                     warnings  warn     mass-change the level for lints which produce warnings
...
Lint groups provided by rustc:

                   name  sub-lints
                   ----  ---------
               warnings  all built-in lints

Meta

rustc 1.22.0-nightly (185cc5f26 2017-10-02)
@TimNN TimNN added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. labels Oct 3, 2017
@zackmdavis
Copy link
Member

Duplicate of #41941. The relevant code is in librustc/lint/levels.rs.

@RalfJung
Copy link
Member

Closing as duplicate.

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.
Projects
None yet
Development

No branches or pull requests

4 participants