Skip to content

Commit

Permalink
Revert "show options for -W help and -W". Fixes #11458.
Browse files Browse the repository at this point in the history
This reverts commit 1009c21.
  • Loading branch information
lucy committed Jan 15, 2014
1 parent 7232dbf commit 3b32ea8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/librustc/driver/driver.rs
Expand Up @@ -1011,7 +1011,7 @@ pub fn optgroups() -> ~[getopts::groups::OptGroup] {
for details)", "FEATURE"),
optopt("", "android-cross-path",
"The path to the Android NDK", "PATH"),
optflagopt("W", "warn",
optmulti("W", "warn",
"Set lint warnings", "OPT"),
optmulti("A", "allow",
"Set lint allowed", "OPT"),
Expand Down
7 changes: 1 addition & 6 deletions src/librustc/lib.rs
Expand Up @@ -227,14 +227,9 @@ pub fn run_compiler(args: &[~str], demitter: @diagnostic::Emitter) {
return;
}

// Display the available lint options if "-W help" or only "-W" is given.
let lint_flags = vec::append(matches.opt_strs("W"),
matches.opt_strs("warn"));

let show_lint_options = lint_flags.iter().any(|x| x == &~"help") ||
(matches.opt_present("W") && lint_flags.is_empty());

if show_lint_options {
if lint_flags.iter().any(|x| x == &~"help") {
describe_warnings();
return;
}
Expand Down

5 comments on commit 3b32ea8

@bors
Copy link
Contributor

@bors bors commented on 3b32ea8 Jan 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 3b32ea8 Jan 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging neeee/rust/master = 3b32ea8 into auto

@bors
Copy link
Contributor

@bors bors commented on 3b32ea8 Jan 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neeee/rust/master = 3b32ea8 merged ok, testing candidate = bf2ab22

@bors
Copy link
Contributor

@bors bors commented on 3b32ea8 Jan 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 3b32ea8 Jan 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = bf2ab22

Please sign in to comment.