Skip to content

Commit

Permalink
Revert "Revert "Revert "docs: Clarify corner caseses with default val…
Browse files Browse the repository at this point in the history
…ues"""

This reverts commit 98f696c.

This was previously missed.  See clap-rs#3076
  • Loading branch information
epage committed Dec 7, 2021
1 parent dcee3d2 commit a12c8fd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/build/arg/mod.rs
Expand Up @@ -612,6 +612,8 @@ impl<'help> Arg<'help> {
///
/// **NOTE:** [Conflicting] rules and [override] rules take precedence over being required
///
/// **NOTE:** An argument is considered present when there is a [`Arg::default_value`]
///
/// # Examples
///
/// ```rust
Expand Down Expand Up @@ -3728,6 +3730,8 @@ impl<'help> Arg<'help> {
/// This argument is [required] only if the specified `arg` is present at runtime and its value
/// equals `val`.
///
/// **NOTE:** An argument is considered present when there is a [`Arg::default_value`]
///
/// # Examples
///
/// ```rust
Expand Down Expand Up @@ -3971,6 +3975,8 @@ impl<'help> Arg<'help> {
/// if this arg (`self`) is present and its value equals to `val`.
/// If it does, `another_arg` will be marked as required.
///
/// **NOTE:** An argument is considered present when there is a [`Arg::default_value`]
///
/// # Examples
///
/// ```rust
Expand Down Expand Up @@ -4029,6 +4035,8 @@ impl<'help> Arg<'help> {
///
/// The requirement will only become valid if this arg's value equals `val`.
///
/// **NOTE:** An argument is considered present when there is a [`Arg::default_value`]
///
/// # Examples
///
/// ```rust
Expand Down Expand Up @@ -4082,6 +4090,8 @@ impl<'help> Arg<'help> {
/// **NOTE:** [Conflicting] rules and [override] rules take precedence over being required
/// by default.
///
/// **NOTE:** An argument is considered present when there is a [`Arg::default_value`]
///
/// # Examples
///
/// ```rust
Expand Down Expand Up @@ -4155,6 +4165,8 @@ impl<'help> Arg<'help> {
///
/// **NOTE** [`Arg::exclusive(true)`] allows specifying an argument which conflicts with every other argument.
///
/// **NOTE:** An argument is considered present when there is a [`Arg::default_value`]
///
/// # Examples
///
/// ```rust
Expand Down Expand Up @@ -4203,6 +4215,8 @@ impl<'help> Arg<'help> {
///
/// **NOTE:** [`Arg::exclusive(true)`] allows specifying an argument which conflicts with every other argument.
///
/// **NOTE:** An argument is considered present when there is a [`Arg::default_value`]
///
/// # Examples
///
/// ```rust
Expand Down
15 changes: 15 additions & 0 deletions src/build/arg_group.rs
Expand Up @@ -240,6 +240,9 @@ impl<'help> ArgGroup<'help> {
/// Use of more than one arg is an error." Vice setting `ArgGroup::multiple(true)` which
/// states, '*At least* one arg from this group must be used. Using multiple is OK."
///
/// **NOTE:** An argument is considered present when there is a
/// [`Arg::default_value`](crate::Arg::default_value)
///
/// # Examples
///
/// ```rust
Expand Down Expand Up @@ -274,6 +277,9 @@ impl<'help> ArgGroup<'help> {
/// [argument requirement rules], you can name other arguments or groups that must be present
/// when any one of the arguments from this group is used.
///
/// **NOTE:** An argument is considered present when there is a
/// [`Arg::default_value`](crate::Arg::default_value)
///
/// **NOTE:** The name provided may be an argument or group name
///
/// # Examples
Expand Down Expand Up @@ -312,6 +318,9 @@ impl<'help> ArgGroup<'help> {
///
/// **NOTE:** The names provided may be an argument or group name
///
/// **NOTE:** An argument is considered present when there is a
/// [`Arg::default_value`](crate::Arg::default_value)
///
/// # Examples
///
/// ```rust
Expand Down Expand Up @@ -352,6 +361,9 @@ impl<'help> ArgGroup<'help> {
///
/// **NOTE:** The name provided may be an argument, or group name
///
/// **NOTE:** An argument is considered present when there is a
/// [`Arg::default_value`](crate::Arg::default_value)
///
/// # Examples
///
/// ```rust
Expand Down Expand Up @@ -385,6 +397,9 @@ impl<'help> ArgGroup<'help> {
///
/// **NOTE:** The names provided may be an argument, or group name
///
/// **NOTE:** An argument is considered present when there is a
/// [`Arg::default_value`](crate::Arg::default_value)
///
/// # Examples
///
/// ```rust
Expand Down

0 comments on commit a12c8fd

Please sign in to comment.