Skip to content

Commit

Permalink
docs: Clarify args_override_self
Browse files Browse the repository at this point in the history
Fixes #4357
  • Loading branch information
epage committed Oct 9, 2022
1 parent 59bf166 commit fd41141
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/builder/arg.rs
Expand Up @@ -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
Expand Down Expand Up @@ -3623,8 +3625,6 @@ impl Arg {
///
/// **NOTE:** Overriding an argument implies they [conflict][Arg::conflicts_with`].
///
/// **NOTE:** All arguments implicitly override themselves.
///
/// # Examples
///
/// ```rust
Expand Down
5 changes: 4 additions & 1 deletion src/builder/command.rs
Expand Up @@ -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.
Expand Down

0 comments on commit fd41141

Please sign in to comment.