1
Fork 0

Remove rustc_session::config::rustc_short_optgroups

This commit is contained in:
Zalathar 2024-11-11 13:17:39 +11:00
parent 3250c1c246
commit 8b4701d74c
2 changed files with 29 additions and 27 deletions

View file

@ -934,9 +934,12 @@ 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()) {
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";