Revert "Revert "docs: Clarify corner caseses with default values""

This reverts commit 4edcda2b99.
This commit is contained in:
Pavan Kumar Sunkara 2021-11-03 18:27:12 +00:00
parent 5e76e6c568
commit 98f696c0a6
2 changed files with 22 additions and 0 deletions

View file

@ -1044,6 +1044,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
@ -1094,6 +1096,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
@ -1327,6 +1331,8 @@ impl<'help> Arg<'help> {
///
/// **NOTE:** [Conflicting] rules and [override] rules take precedence over being required
///
/// **NOTE:** This argument is considered present when there is a [`Arg::default_value`]
///
/// # Examples
///
/// ```rust
@ -1388,6 +1394,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:** This argument is considered present when there is a [`Arg::default_value`]
///
/// # Examples
///
/// ```rust
@ -1509,6 +1517,8 @@ impl<'help> Arg<'help> {
/// Allows specifying that this argument is [required] only if the specified
/// `arg` is present at runtime and its value equals `val`.
///
/// **NOTE:** This argument is considered present when there is a [`Arg::default_value`]
///
/// # Examples
///
/// ```rust
@ -1785,6 +1795,8 @@ impl<'help> Arg<'help> {
/// **NOTE:** [Conflicting] rules and [override] rules take precedence over being required
/// by default.
///
/// **NOTE:** This argument is considered present when there is a [`Arg::default_value`]
///
/// # Examples
///
/// ```rust

View file

@ -249,6 +249,8 @@ 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`]
///
/// # Examples
///
/// ```rust
@ -284,6 +286,8 @@ 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`]
///
/// # Examples
///
/// ```rust
@ -319,6 +323,8 @@ 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`]
///
/// # Examples
///
/// ```rust
@ -357,6 +363,8 @@ 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`]
///
/// # Examples
///
/// ```rust
@ -389,6 +397,8 @@ 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`]
///
/// # Examples
///
/// ```rust