From e59ae78bd64422c2365929db0cfc405ccff8ff4d Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Sun, 19 Feb 2023 21:53:53 +0000 Subject: [PATCH] Enhance help texts of position args --- src/bin/cargo/commands/run.rs | 1 + src/bin/cargo/commands/rustc.rs | 2 +- src/bin/cargo/commands/rustdoc.rs | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bin/cargo/commands/run.rs b/src/bin/cargo/commands/run.rs index db8269bb33f..cde754c7a03 100644 --- a/src/bin/cargo/commands/run.rs +++ b/src/bin/cargo/commands/run.rs @@ -12,6 +12,7 @@ pub fn cli() -> Command { .arg_quiet() .arg( Arg::new("args") + .help("Arguments for the binary or example to run") .value_parser(value_parser!(std::ffi::OsString)) .num_args(0..) .trailing_var_arg(true), diff --git a/src/bin/cargo/commands/rustc.rs b/src/bin/cargo/commands/rustc.rs index e46e33caee9..de73eb80c8d 100644 --- a/src/bin/cargo/commands/rustc.rs +++ b/src/bin/cargo/commands/rustc.rs @@ -12,7 +12,7 @@ pub fn cli() -> Command { .arg( Arg::new("args") .num_args(0..) - .help("Rustc flags") + .help("Extra rustc flags") .trailing_var_arg(true), ) .arg_package("Package to build") diff --git a/src/bin/cargo/commands/rustdoc.rs b/src/bin/cargo/commands/rustdoc.rs index 56a889bc5cf..e87f435fd1f 100644 --- a/src/bin/cargo/commands/rustdoc.rs +++ b/src/bin/cargo/commands/rustdoc.rs @@ -6,7 +6,12 @@ pub fn cli() -> Command { subcommand("rustdoc") .about("Build a package's documentation, using specified custom flags.") .arg_quiet() - .arg(Arg::new("args").num_args(0..).trailing_var_arg(true)) + .arg( + Arg::new("args") + .help("Extra rustdoc flags") + .num_args(0..) + .trailing_var_arg(true), + ) .arg(flag( "open", "Opens the docs in a browser after the operation",