Skip to content

Mention the warnings lint group in rustc -W help text #30203

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

Closed
Manishearth opened this issue Dec 4, 2015 · 5 comments
Closed

Mention the warnings lint group in rustc -W help text #30203

Manishearth opened this issue Dec 4, 2015 · 5 comments
Assignees
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

Comments

@Manishearth
Copy link
Member

rustc -W help mentions:

Lint groups provided by rustc:

         name  sub-lints
         ----  ---------
    bad-style  non-camel-case-types, non-snake-case, non-upper-case-globals
       unused  unused-imports, unused-variables, unused-assignments, dead-code, unused-mut, unreachable-code, unused-must-use, unused-unsafe, path-statements, unused-attributes

There's another lint group, warnings, which turns off all builtin lints. We should mention it in this list (preferably at the top), or in another line below.

Relevant code:

let print_lint_groups = |lints: Vec<(&'static str, Vec<lint::LintId>)>| {

If you wish to make it appear in the table, ensure that max_name_len takes the presence of warnings into account too. Instead of listing the lints for the second column, add some text along the lines of "all builtin lints".

@Manishearth Manishearth added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. E-help-wanted Call for participation: Help is requested to fix this issue. labels Dec 4, 2015
@faineance
Copy link
Contributor

Can I take this?

@Manishearth
Copy link
Member Author

Sure! Let me know if you need help!

(assigning to self since I can't assign it to you)

@Manishearth Manishearth self-assigned this Dec 14, 2015
@athaeryn
Copy link
Contributor

athaeryn commented Jan 4, 2016

@faineance are you working on this? If you're not, I'd like to take it!

bors added a commit that referenced this issue Jan 7, 2016
…arth

Fixes #30203.

This is my first time writing Rust, and I think this code could be a bit better. Any suggestions?
@huonw
Copy link
Member

huonw commented Jan 22, 2016

Hm, @Manishearth, where is this lint group defined?

@Manishearth
Copy link
Member Author

It's not. It's magically in built, and the help text is similarly hand-crafted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Projects
None yet
Development

No branches or pull requests

4 participants