Skip to content

Commit 6e66ee8

Browse files
committed
Auto merge of #11740 - weihanglo:issue/9707, r=epage
Enhance help texts of position args
2 parents 9608f69 + e59ae78 commit 6e66ee8

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/bin/cargo/commands/run.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pub fn cli() -> Command {
1212
.arg_quiet()
1313
.arg(
1414
Arg::new("args")
15+
.help("Arguments for the binary or example to run")
1516
.value_parser(value_parser!(std::ffi::OsString))
1617
.num_args(0..)
1718
.trailing_var_arg(true),

src/bin/cargo/commands/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub fn cli() -> Command {
1212
.arg(
1313
Arg::new("args")
1414
.num_args(0..)
15-
.help("Rustc flags")
15+
.help("Extra rustc flags")
1616
.trailing_var_arg(true),
1717
)
1818
.arg_package("Package to build")

src/bin/cargo/commands/rustdoc.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ pub fn cli() -> Command {
66
subcommand("rustdoc")
77
.about("Build a package's documentation, using specified custom flags.")
88
.arg_quiet()
9-
.arg(Arg::new("args").num_args(0..).trailing_var_arg(true))
9+
.arg(
10+
Arg::new("args")
11+
.help("Extra rustdoc flags")
12+
.num_args(0..)
13+
.trailing_var_arg(true),
14+
)
1015
.arg(flag(
1116
"open",
1217
"Opens the docs in a browser after the operation",

0 commit comments

Comments
 (0)