Skip to content

Commit dff2180

Browse files
committed
Explain where setup_panic!() should be called
This explanation was missing from the macro documentation. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
1 parent 35b1a08 commit dff2180

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ macro_rules! metadata {
8888
/// The Metadata struct can't implement `Default` because of orphan rules, which
8989
/// means you need to provide all fields for initialisation.
9090
///
91+
/// The macro should be called from within a function, for example as the first line of the
92+
/// `main()` function of the program.
93+
///
9194
/// ```
9295
/// use human_panic::setup_panic;
9396
///

0 commit comments

Comments
 (0)