docs: Clarify most asserts are for debug builds

This commit is contained in:
Ed Page 2023-09-19 12:38:21 -05:00
parent e6e539660f
commit c344edf8b9
4 changed files with 15 additions and 14 deletions

View file

@ -470,7 +470,7 @@ impl Arg {
///
/// [`Command`] will [`panic!`] if indexes are skipped (such as defining `index(1)` and `index(3)`
/// but not `index(2)`, or a positional argument is defined as multiple and is not the highest
/// index
/// index (debug builds)
///
/// # Examples
///

View file

@ -553,7 +553,7 @@ impl Command {
///
/// # Panics
///
/// If contradictory arguments or settings exist.
/// If contradictory arguments or settings exist (debug builds).
///
/// # Examples
///
@ -577,7 +577,7 @@ impl Command {
///
/// # Panics
///
/// If contradictory arguments or settings exist.
/// If contradictory arguments or settings exist (debug builds).
///
/// # Examples
///
@ -605,7 +605,7 @@ impl Command {
///
/// # Panics
///
/// If contradictory arguments or settings exist.
/// If contradictory arguments or settings exist (debug builds).
///
/// # Examples
///
@ -638,7 +638,7 @@ impl Command {
///
/// # Panics
///
/// If contradictory arguments or settings exist.
/// If contradictory arguments or settings exist (debug builds).
///
/// # Examples
///
@ -677,7 +677,7 @@ impl Command {
///
/// # Panics
///
/// If contradictory arguments or settings exist.
/// If contradictory arguments or settings exist (debug builds).
///
/// # Examples
///
@ -723,7 +723,7 @@ impl Command {
///
/// # Panics
///
/// If contradictory arguments or settings exist.
/// If contradictory arguments or settings exist (debug builds).
///
/// # Examples
///
@ -1414,6 +1414,7 @@ impl Command {
///
/// # Panics
///
/// On debug builds:
/// ```rust,no_run
/// # use clap_builder as clap;
/// # use clap::{Command, Arg};

View file

@ -22,7 +22,7 @@ impl ValueRange {
///
/// # Panics
///
/// If the end is less than the start
/// If the end is less than the start (debug builds)
///
/// # Examples
///

View file

@ -237,7 +237,7 @@ impl ArgMatches {
///
/// # Panics
///
/// If the argument definition and access mismatch. To handle this case programmatically, see
/// If the argument definition and access mismatch (debug builds). To handle this case programmatically, see
/// [`ArgMatches::try_get_occurrences`].
///
/// # Examples
@ -490,7 +490,7 @@ impl ArgMatches {
///
/// # Panics
///
/// If `id` is not a valid argument or group name. To handle this case programmatically, see
/// If `id` is not a valid argument or group name (debug builds). To handle this case programmatically, see
/// [`ArgMatches::try_contains_id`].
///
/// # Examples
@ -570,7 +570,7 @@ impl ArgMatches {
///
/// # Panics
///
/// If `id` is not a valid argument or group id.
/// If `id` is not a valid argument or group id (debug builds).
///
/// # Examples
///
@ -617,7 +617,7 @@ impl ArgMatches {
///
/// # Panics
///
/// If `id` is not a valid argument or group id.
/// If `id` is not a valid argument or group id (debug builds).
///
/// # Examples
///
@ -765,7 +765,7 @@ impl ArgMatches {
///
/// # Panics
///
/// If `id` is not a valid argument or group id.
/// If `id` is not a valid argument or group id (debug builds).
///
/// # Examples
///
@ -969,7 +969,7 @@ impl ArgMatches {
///
/// # Panics
///
/// If `id` is not a valid subcommand.
/// If `id` is not a valid subcommand (debug builds).
///
/// # Examples
///