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

command-line help for -{W,A,D,F} is ambiguous (suggests presence of non-existent 'all' option) #28708

Closed
froydnj opened this issue Sep 28, 2015 · 5 comments
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@froydnj
Copy link
Contributor

froydnj commented Sep 28, 2015

I downloaded the rust 1.3.0 distribution; rustc -W help says, in part:

Available lint options:
    -W <foo>           Warn about <foo>
    -A <foo>           Allow <foo>
    -D <foo>           Deny <foo>
    -F <foo>           Forbid <foo> (deny, and deny all overrides)

The documentation here for -F suggests to me that -F all would be acceptable (perhaps -W all or -A all too, perhaps). But that doesn't seem to work; rustc says:

error: unknown forbid flag: all
error: aborting due to previous error

Either adding the all group or clarifying the help output around -F would be most welcome. (It's also not immediately clear what the difference between -D and -F is, especially since -D would apparently override the presence of an earlier -F...?)

@pnkfelix
Copy link
Member

Would "deny <foo> and all attempts to override" be clearer?

@froydnj
Copy link
Contributor Author

froydnj commented Sep 28, 2015

I think so, yes.

@pnkfelix
Copy link
Member

@froydnj in particular, -F is meant to prevent embedded uses of #[allow(..)] or #[warn(..)], which would normally override a -D .. or #[deny(..)]

@froydnj
Copy link
Contributor Author

froydnj commented Sep 28, 2015

Indeed, stating it that way makes it much clearer what's going on. I think I was confused by the use of "deny" in multiple contexts here.

@pnkfelix pnkfelix changed the title command-line help for -{W,A,D,F} suggests presence of non-existent 'all' option command-line help for -{W,A,D,F} is ambiguous (suggests presence of non-existent 'all' option) Sep 28, 2015
@steveklabnik steveklabnik added the A-frontend Area: Compiler frontend (errors, parsing and HIR) label Sep 29, 2015
@steveklabnik
Copy link
Member

Triage: no change. Seems easy enough, tagging as such.

@steveklabnik steveklabnik added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Mar 1, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this issue Mar 12, 2017
…excrichton

Improve wording in the -{W,A,F,D} options

This was so trivial that I'm wondering whether I'm missing something.

Fixes rust-lang#28708.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) 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

3 participants