diff options
| author | bors <bors@rust-lang.org> | 2017-07-30 20:19:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-07-30 20:19:53 +0000 |
| commit | aac223f4f5d5ca979c694b614d4db37a7200528d (patch) | |
| tree | d981fa8f55722f23cc331de04e30be1b522dd95e | |
| parent | 489b792babba74b57f1793e91a76fd1f55972759 (diff) | |
| parent | 39ef545f109e40709c044ce5a836025ba0613a19 (diff) | |
| download | rust-aac223f4f5d5ca979c694b614d4db37a7200528d.tar.gz rust-aac223f4f5d5ca979c694b614d4db37a7200528d.zip | |
Auto merge of #43556 - dmizuk:remove-z-opt-usage, r=arielb1
librustc_driver: Remove -Z option from usage on stable compiler The `-Z` flag has been disabled since Rust 1.19 stable, but it still shows in `rustc --help`. This PR addresses the inconsistency by removing the message on the stable channel.
| -rw-r--r-- | src/librustc_driver/lib.rs | 14 |
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) { |
