Skip to content

Commit

Permalink
auto merge of #11574 : neeee/rust/master, r=alexcrichton
Browse files Browse the repository at this point in the history
Reverted according to #11458 (comment). Fixes #11458.
  • Loading branch information
bors committed Jan 16, 2014
2 parents a5ed0c5 + 3b32ea8 commit bf2ab22
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit bf2ab22

Please sign in to comment.