about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaiki Mizukami <mizukami1113@gmail.com>2017-07-30 18:17:22 +0900
committerDaiki Mizukami <mizukami1113@gmail.com>2017-07-30 18:55:35 +0900
commit39ef545f109e40709c044ce5a836025ba0613a19 (patch)
tree4c179339d23233e372f268f3a514e2e93e1fbb6b
parentad36f8febad77942b4f1f0e2ba0f422b69276d7b (diff)
librustc_driver: Remove -Z option from usage on stable compiler
-rw-r--r--src/librustc_driver/lib.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index e139f81416e..d6b1eb86937 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -795,7 +795,12 @@ fn usage(verbose: bool, include_unstable_options: bool) {
         (option.apply)(&mut options);
     }
     let message = format!("Usage: rustc [OPTIONS] INPUT");
-    let extra_help = if verbose {
+    let nightly_help = if nightly_options::is_nightly_build() {
+        "\n    -Z help             Print internal options for debugging rustc"
+    } else {
+        ""
+    };
+    let verbose_help = if verbose {
         ""
     } else {
         "\n    --help -v           Print the full set of options rustc accepts"
@@ -803,11 +808,10 @@ fn usage(verbose: bool, include_unstable_options: bool) {
     println!("{}\nAdditional help:
     -C help             Print codegen options
     -W help             \
-              Print 'lint' options and default settings
-    -Z help             Print internal \
-              options for debugging rustc{}\n",
+              Print 'lint' options and default settings{}{}\n",
              options.usage(&message),
-             extra_help);
+             nightly_help,
+             verbose_help);
 }
 
 fn describe_lints(lint_store: &lint::LintStore, loaded_plugins: bool) {