diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs index 047aebf83f..d099c8d91d 100644 --- a/src/cli/rustup_mode.rs +++ b/src/cli/rustup_mode.rs @@ -457,11 +457,7 @@ pub(crate) fn cli() -> Command { Command::new("dump-testament") .about("Dump information about the build") .hide(true), // Not for users, only CI - ); - - app = RustupSubcmd::augment_subcommands(app); - - app = app + ) .subcommand(Command::new("check").about("Check for updates to Rust toolchains and rustup")) .subcommand( Command::new("default") @@ -762,20 +758,21 @@ pub(crate) fn cli() -> Command { .default_value(SelfUpdateMode::default_mode()), ), ), + ) + .subcommand( + Command::new("completions") + .about("Generate tab-completion scripts for your shell") + .after_help(COMPLETIONS_HELP) + .arg_required_else_help(true) + .arg(Arg::new("shell").value_parser(EnumValueParser::::new())) + .arg( + Arg::new("command") + .value_parser(EnumValueParser::::new()) + .default_missing_value("rustup"), + ), ); - app.subcommand( - Command::new("completions") - .about("Generate tab-completion scripts for your shell") - .after_help(COMPLETIONS_HELP) - .arg_required_else_help(true) - .arg(Arg::new("shell").value_parser(EnumValueParser::::new())) - .arg( - Arg::new("command") - .value_parser(EnumValueParser::::new()) - .default_missing_value("rustup"), - ), - ) + RustupSubcmd::augment_subcommands(app) } fn verbose_arg(help: &'static str) -> Arg {