Skip to content

Commit 2f0b4dd

Browse files
committed
Rollup merge of rust-lang#29417 - pmarcelll:assert-doc, r=steveklabnik
…m message I recently discovered that this is not mentioned in the docs, only in the examples, and it's not evident for people coming from C++ r? @steveklabnik
2 parents 3f3b55b + ad8dcb6 commit 2f0b4dd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/libcore/macros.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ macro_rules! panic {
3434
/// This will invoke the `panic!` macro if the provided expression cannot be
3535
/// evaluated to `true` at runtime.
3636
///
37+
/// This macro has a second version, where a custom panic message can be provided.
38+
///
3739
/// # Examples
3840
///
3941
/// ```
@@ -99,6 +101,9 @@ macro_rules! assert_eq {
99101
/// This will invoke the `panic!` macro if the provided expression cannot be
100102
/// evaluated to `true` at runtime.
101103
///
104+
/// Like `assert!`, this macro also has a second version, where a custom panic
105+
/// message can be provided.
106+
///
102107
/// Unlike `assert!`, `debug_assert!` statements are only enabled in non
103108
/// optimized builds by default. An optimized build will omit all
104109
/// `debug_assert!` statements unless `-C debug-assertions` is passed to the

0 commit comments

Comments
 (0)