about summary refs log tree commit diff
diff options
context:
space:
mode:
authorlucy <ne.tetewi@gmail.com>2014-01-15 18:31:48 +0100
committerlucy <ne.tetewi@gmail.com>2014-01-15 18:38:10 +0100
commit3b32ea8c93bc68e7f690dcbcb3e40230ae9c6e9f (patch)
tree0404bae2f573d4b474bb55d6aebd969e4ec77a16
parent7232dbf7685ba386d079993041d7aea32ee05911 (diff)
downloadrust-3b32ea8c93bc68e7f690dcbcb3e40230ae9c6e9f.tar.gz
rust-3b32ea8c93bc68e7f690dcbcb3e40230ae9c6e9f.zip
Revert "show options for -W help and -W". Fixes #11458.
This reverts commit 1009c21ad7b1db366a5c600946652cc490598ec1.
-rw-r--r--src/librustc/driver/driver.rs2
-rw-r--r--src/librustc/lib.rs7
2 files changed, 2 insertions, 7 deletions
diff --git a/src/librustc/driver/driver.rs b/src/librustc/driver/driver.rs
index aa3ab80b487..9cb7f2e34ae 100644
--- a/src/librustc/driver/driver.rs
+++ b/src/librustc/driver/driver.rs
@@ -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"),
diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs
index eb4623d554b..dd1346e86e8 100644
--- a/src/librustc/lib.rs
+++ b/src/librustc/lib.rs
@@ -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;
     }