docs: Clarify args_override_self

Fixes #4357
This commit is contained in:
Ed Page 2022-10-08 20:18:25 -05:00
parent 59bf166183
commit fd41141071
2 changed files with 6 additions and 3 deletions

View file

@ -3521,6 +3521,8 @@ impl Arg {
///
/// **NOTE** [`Arg::exclusive(true)`] allows specifying an argument which conflicts with every other argument.
///
/// **NOTE:** All arguments implicitly conflict with themselves.
///
/// # Examples
///
/// ```rust
@ -3623,8 +3625,6 @@ impl Arg {
///
/// **NOTE:** Overriding an argument implies they [conflict][Arg::conflicts_with`].
///
/// **NOTE:** All arguments implicitly override themselves.
///
/// # Examples
///
/// ```rust

View file

@ -975,7 +975,10 @@ impl Command {
}
}
/// Specifies that all arguments override themselves.
/// Replace prior occurrences of arguments rather than error
///
/// For any argument that would conflict with itself by default (e.g.
/// [`ArgAction::Set`][ArgAction::Set], it will now override itself.
///
/// This is the equivalent to saying the `foo` arg using [`Arg::overrides_with("foo")`] for all
/// defined arguments.