]> git.lizzy.rs Git - rust.git/commitdiff
Revert "show options for -W help and -W". Fixes #11458.
authorlucy <ne.tetewi@gmail.com>
Wed, 15 Jan 2014 17:31:48 +0000 (18:31 +0100)
committerlucy <ne.tetewi@gmail.com>
Wed, 15 Jan 2014 17:38:10 +0000 (18:38 +0100)
This reverts commit 1009c21ad7b1db366a5c600946652cc490598ec1.

src/librustc/driver/driver.rs
src/librustc/lib.rs

index aa3ab80b487970753eda1ddbd1515c318ca0f7f1..9cb7f2e34ae442be05697ad0cf955fa434876219 100644 (file)
@@ -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"),
index eb4623d554bc10069e4442ccc9b5b099b348726a..dd1346e86e8eb981bcab8733a9d9e033d0af43a4 100644 (file)
@@ -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;
     }