diff options
Diffstat (limited to 'compiler/rustc_driver_impl')
| -rw-r--r-- | compiler/rustc_driver_impl/Cargo.toml | 5 | ||||
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 13 |
2 files changed, 8 insertions, 10 deletions
diff --git a/compiler/rustc_driver_impl/Cargo.toml b/compiler/rustc_driver_impl/Cargo.toml index 74da0d11e4b..81f15ebcbf8 100644 --- a/compiler/rustc_driver_impl/Cargo.toml +++ b/compiler/rustc_driver_impl/Cargo.toml @@ -77,9 +77,4 @@ rustc_randomized_layouts = [ 'rustc_index/rustc_randomized_layouts', 'rustc_middle/rustc_randomized_layouts' ] -rustc_use_parallel_compiler = [ - 'rustc_data_structures/rustc_use_parallel_compiler', - 'rustc_interface/rustc_use_parallel_compiler', - 'rustc_middle/rustc_use_parallel_compiler' -] # tidy-alphabetical-end diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index d2c4335cf2b..b6f7abed6f3 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -934,10 +934,13 @@ pub fn version_at_macro_invocation( } fn usage(verbose: bool, include_unstable_options: bool, nightly_build: bool) { - let groups = if verbose { config::rustc_optgroups() } else { config::rustc_short_optgroups() }; let mut options = getopts::Options::new(); - for option in groups.iter().filter(|x| include_unstable_options || x.is_stable()) { - (option.apply)(&mut options); + for option in config::rustc_optgroups() + .iter() + .filter(|x| verbose || !x.is_verbose_help_only) + .filter(|x| include_unstable_options || x.is_stable()) + { + option.apply(&mut options); } let message = "Usage: rustc [OPTIONS] INPUT"; let nightly_help = if nightly_build { @@ -1219,7 +1222,7 @@ pub fn handle_options(early_dcx: &EarlyDiagCtxt, args: &[String]) -> Option<geto let mut options = getopts::Options::new(); let optgroups = config::rustc_optgroups(); for option in &optgroups { - (option.apply)(&mut options); + option.apply(&mut options); } let matches = options.parse(args).unwrap_or_else(|e| { let msg: Option<String> = match e { @@ -1233,7 +1236,7 @@ pub fn handle_options(early_dcx: &EarlyDiagCtxt, args: &[String]) -> Option<geto optgroups.iter().find(|option| option.name == opt).map(|option| { // Print the help just for the option in question. let mut options = getopts::Options::new(); - (option.apply)(&mut options); + option.apply(&mut options); // getopt requires us to pass a function for joining an iterator of // strings, even though in this case we expect exactly one string. options.usage_with_format(|it| { |
