From 5c7a94459c97836b2cea66d1346ba854e0f46ebe Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 3 Apr 2019 22:20:18 +0200 Subject: [PATCH 1/3] Add documentation on the -Z flag on the command-line arguments section in the rustc book. --- src/doc/rustc/src/command-line-arguments.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/doc/rustc/src/command-line-arguments.md b/src/doc/rustc/src/command-line-arguments.md index d7e789b5a11f7..18d7052c2c574 100644 --- a/src/doc/rustc/src/command-line-arguments.md +++ b/src/doc/rustc/src/command-line-arguments.md @@ -86,6 +86,12 @@ This flag will set which lints should be set to the [deny level](lints/levels.ht This flag will set which lints should be set to the [forbid level](lints/levels.html#forbid). +## `-Z`: set options for debugging rustc + +This flag lets you set options for debugging rustc. In order to set multiple options, the -Z flag +can be used multiple times. For example: `rustc -Z verbose -Z time`. Specifying options with -Z is +only available on nightly. To view all available options run: `rustc -Z help`. + ## `--cap-lints`: set the most restrictive lint level This flag lets you 'cap' lints, for more, [see here](lints/levels.html#capping-lints). From 7acfa453df8f3c4b458614ff86d857ad53a7994d Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 10 Apr 2019 12:10:25 +0200 Subject: [PATCH 2/3] Updated the documentation, now claiming the -Z is associated to unstable compiler flags, instead of flags for debugging. --- src/librustc_driver/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 4b7cffaad5509..ca6bd9616536e 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -743,7 +743,7 @@ fn usage(verbose: bool, include_unstable_options: bool) { } let message = "Usage: rustc [OPTIONS] INPUT"; let nightly_help = if nightly_options::is_nightly_build() { - "\n -Z help Print internal options for debugging rustc" + "\n -Z help Print unstable compiler options" } else { "" }; @@ -891,7 +891,7 @@ Available lint options: } fn describe_debug_flags() { - println!("\nAvailable debug options:\n"); + println!("\nAvailable options:\n"); print_flag_list("-Z", config::DB_OPTIONS); } From cdeb7455eaa66a531f56c1366b96b9f4db25384d Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 10 Apr 2019 12:20:47 +0200 Subject: [PATCH 3/3] Updated the description of -Z in the rustc book. --- src/doc/rustc/src/command-line-arguments.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/doc/rustc/src/command-line-arguments.md b/src/doc/rustc/src/command-line-arguments.md index 18d7052c2c574..dfb40284ef6cf 100644 --- a/src/doc/rustc/src/command-line-arguments.md +++ b/src/doc/rustc/src/command-line-arguments.md @@ -86,11 +86,12 @@ This flag will set which lints should be set to the [deny level](lints/levels.ht This flag will set which lints should be set to the [forbid level](lints/levels.html#forbid). -## `-Z`: set options for debugging rustc +## `-Z`: set unstable options -This flag lets you set options for debugging rustc. In order to set multiple options, the -Z flag -can be used multiple times. For example: `rustc -Z verbose -Z time`. Specifying options with -Z is -only available on nightly. To view all available options run: `rustc -Z help`. +This flag will allow you to set unstable options of rustc. In order to set multiple options, +the -Z flag can be used multiple times. For example: `rustc -Z verbose -Z time`. +Specifying options with -Z is only available on nightly. To view all available options +run: `rustc -Z help`. ## `--cap-lints`: set the most restrictive lint level