Skip to content

Commit 027a625

Browse files
committed
Move toolchain and default commands first
1 parent c89f131 commit 027a625

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

src/cli/rustup_mode.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,23 @@ enum RustupSubcmd {
125125
#[command(hide = true)]
126126
DumpTestament,
127127

128+
/// Modify or query the installed toolchains
129+
Toolchain {
130+
#[command(subcommand)]
131+
subcmd: ToolchainSubcmd,
132+
},
133+
134+
/// Set the default toolchain
135+
#[command(after_help = DEFAULT_HELP)]
136+
Default {
137+
#[arg(help = MAYBE_RESOLVABLE_TOOLCHAIN_ARG_HELP)]
138+
toolchain: Option<MaybeResolvableToolchainName>,
139+
140+
/// Install toolchains that require an emulator. See https://github.com/rust-lang/rustup/wiki/Non-host-toolchains
141+
#[arg(long)]
142+
force_non_host: bool,
143+
},
144+
128145
/// Show the active and installed toolchains or profiles
129146
#[command(after_help = SHOW_HELP)]
130147
Show {
@@ -162,23 +179,6 @@ enum RustupSubcmd {
162179
/// Check for updates to Rust toolchains and rustup
163180
Check,
164181

165-
/// Set the default toolchain
166-
#[command(after_help = DEFAULT_HELP)]
167-
Default {
168-
#[arg(help = MAYBE_RESOLVABLE_TOOLCHAIN_ARG_HELP)]
169-
toolchain: Option<MaybeResolvableToolchainName>,
170-
171-
/// Install toolchains that require an emulator. See https://github.com/rust-lang/rustup/wiki/Non-host-toolchains
172-
#[arg(long)]
173-
force_non_host: bool,
174-
},
175-
176-
/// Modify or query the installed toolchains
177-
Toolchain {
178-
#[command(subcommand)]
179-
subcmd: ToolchainSubcmd,
180-
},
181-
182182
/// Modify a toolchain's supported targets
183183
Target {
184184
#[command(subcommand)]

tests/suite/cli-ui/rustup/rustup_help_cmd_stdout.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ The Rust toolchain installer
99
Usage: rustup[EXE] [OPTIONS] [+toolchain] [COMMAND]
1010
1111
Commands:
12+
toolchain Modify or query the installed toolchains
13+
default Set the default toolchain
1214
show Show the active and installed toolchains or profiles
1315
update Update Rust toolchains and rustup
1416
check Check for updates to Rust toolchains and rustup
15-
default Set the default toolchain
16-
toolchain Modify or query the installed toolchains
1717
target Modify a toolchain's supported targets
1818
component Modify a toolchain's installed components
1919
override Modify toolchain overrides for directories

tests/suite/cli-ui/rustup/rustup_help_flag_stdout.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ The Rust toolchain installer
99
Usage: rustup[EXE] [OPTIONS] [+toolchain] [COMMAND]
1010
1111
Commands:
12+
toolchain Modify or query the installed toolchains
13+
default Set the default toolchain
1214
show Show the active and installed toolchains or profiles
1315
update Update Rust toolchains and rustup
1416
check Check for updates to Rust toolchains and rustup
15-
default Set the default toolchain
16-
toolchain Modify or query the installed toolchains
1717
target Modify a toolchain's supported targets
1818
component Modify a toolchain's installed components
1919
override Modify toolchain overrides for directories

tests/suite/cli-ui/rustup/rustup_only_options_stdout.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ The Rust toolchain installer
99
Usage: rustup[EXE] [OPTIONS] [+toolchain] [COMMAND]
1010
1111
Commands:
12+
toolchain Modify or query the installed toolchains
13+
default Set the default toolchain
1214
show Show the active and installed toolchains or profiles
1315
update Update Rust toolchains and rustup
1416
check Check for updates to Rust toolchains and rustup
15-
default Set the default toolchain
16-
toolchain Modify or query the installed toolchains
1717
target Modify a toolchain's supported targets
1818
component Modify a toolchain's installed components
1919
override Modify toolchain overrides for directories

0 commit comments

Comments
 (0)