Skip to content

Commit afb2a3d

Browse files
committed
docs(complete): Clarify some panic conditions
1 parent b488aab commit afb2a3d

File tree

1 file changed

+8
-0
lines changed
  • clap_complete/src/generator

1 file changed

+8
-0
lines changed

clap_complete/src/generator/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ use clap::App;
1414
pub trait Generator {
1515
/// Returns the file name that is created when this generator is called during compile time.
1616
///
17+
/// # Panics
18+
///
19+
/// May panic when called outside of the context of [`generate`] or [`generate_to`]
20+
///
1721
/// # Examples
1822
///
1923
/// ```
@@ -34,6 +38,10 @@ pub trait Generator {
3438

3539
/// Generates output out of [`clap::App`](App).
3640
///
41+
/// # Panics
42+
///
43+
/// May panic when called outside of the context of [`generate`] or [`generate_to`]
44+
///
3745
/// # Examples
3846
///
3947
/// The following example generator displays the [`clap::App`](App)

0 commit comments

Comments
 (0)