Skip to content

Commit 7566762

Browse files
authored
Merge pull request #6125 from epage/docs
docs: Try to clarify several points
2 parents 2c04acd + c803d16 commit 7566762

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

clap_builder/src/builder/command.rs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,13 @@ impl Command {
624624

625625
/// Custom error message for post-parsing validation
626626
///
627+
/// **Note:** this will ensure the `Command` has been sufficiently [built][Command::build] for any
628+
/// relevant context, including usage.
629+
///
630+
/// # Panics
631+
///
632+
/// If contradictory arguments or settings exist (debug builds).
633+
///
627634
/// # Examples
628635
///
629636
/// ```rust
@@ -906,6 +913,12 @@ impl Command {
906913
///
907914
/// See also [`Command::print_long_help`].
908915
///
916+
/// **Note:** this will ensure the `Command` has been sufficiently [built][Command::build].
917+
///
918+
/// # Panics
919+
///
920+
/// If contradictory arguments or settings exist (debug builds).
921+
///
909922
/// # Examples
910923
///
911924
/// ```rust
@@ -931,6 +944,12 @@ impl Command {
931944
///
932945
/// See also [`Command::print_help`].
933946
///
947+
/// **Note:** this will ensure the `Command` has been sufficiently [built][Command::build].
948+
///
949+
/// # Panics
950+
///
951+
/// If contradictory arguments or settings exist (debug builds).
952+
///
934953
/// # Examples
935954
///
936955
/// ```rust
@@ -959,6 +978,12 @@ impl Command {
959978
///
960979
/// See also [`Command::render_long_help`].
961980
///
981+
/// **Note:** this will ensure the `Command` has been sufficiently [built][Command::build].
982+
///
983+
/// # Panics
984+
///
985+
/// If contradictory arguments or settings exist (debug builds).
986+
///
962987
/// # Examples
963988
///
964989
/// ```rust
@@ -986,6 +1011,12 @@ impl Command {
9861011
///
9871012
/// See also [`Command::render_help`].
9881013
///
1014+
/// **Note:** this will ensure the `Command` has been sufficiently [built][Command::build].
1015+
///
1016+
/// # Panics
1017+
///
1018+
/// If contradictory arguments or settings exist (debug builds).
1019+
///
9891020
/// # Examples
9901021
///
9911022
/// ```rust
@@ -1091,6 +1122,12 @@ impl Command {
10911122

10921123
/// Usage statement
10931124
///
1125+
/// **Note:** this will ensure the `Command` has been sufficiently [built][Command::build].
1126+
///
1127+
/// # Panics
1128+
///
1129+
/// If contradictory arguments or settings exist (debug builds).
1130+
///
10941131
/// ### Examples
10951132
///
10961133
/// ```rust

src/_derive/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@
320320
//! | `Option<Vec<Vec<T>>>` | `0..` occurrences of argument, grouped by occurrence | `.action(ArgAction::Append).required(false)` | requires `unstable-v5` |
321321
//!
322322
//! In addition, [`.value_parser(value_parser!(T))`][crate::value_parser!] is called for each
323-
//! field.
323+
//! field in the absence of a [`#[arg(value_parser)]` attribute](#arg-attributes).
324324
//!
325325
//! Notes:
326326
//! - For custom type behavior, you can override the implied attributes/settings and/or set additional ones

0 commit comments

Comments
 (0)