Therefore, the documentation for this method should link to Arg::trailing_var_arg instead, which is exactly what this PR does.
Note that there are a few more questionable uses of Command::trailing_var_arg, which I didn't dare to touch:
$ git grep -Firn 'nd::trailing_var'
clap_builder/src/builder/value_hint.rs:52: /// [`.num_args(1..)`] and Command must use [`Command::trailing_var_arg(true)`]. The result is that the
clap_builder/src/builder/value_hint.rs:56: /// [`Command::trailing_var_arg(true)`]: crate::Command::trailing_var_arg
clap_complete/examples/completion-derive.rs:56: // Command::trailing_var_ar is required to use ValueHint::CommandWithArguments
The first two may or may not be outdated; the last one might be outdated, and is a typo in any case. But I'm not sure enough to fix either of them.
Bonus points if someone writes a linter that automatically checks whether documentation-internal links point to #[doc(hidden)] items. :-)
(This is an obvious bug or documentation fix, so that's why I skip the issue creation process.)
Currently, the method
Command::dont_delimit_trailing_values
contains a link toCommand::trailing_var_arg
, but that link is dead, as the method is not documented (anymore).Therefore, the documentation for this method should link to
Arg::trailing_var_arg
instead, which is exactly what this PR does.Note that there are a few more questionable uses of
Command::trailing_var_arg
, which I didn't dare to touch:The first two may or may not be outdated; the last one might be outdated, and is a typo in any case. But I'm not sure enough to fix either of them.
Bonus points if someone writes a linter that automatically checks whether documentation-internal links point to
#[doc(hidden)]
items. :-)