Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add links from assert_eq! docs to debug_assert_eq!, etc. #128240

Merged
merged 1 commit into from
Jul 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions library/core/src/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ macro_rules! panic {

/// Asserts that two expressions are equal to each other (using [`PartialEq`]).
///
/// Assertions are always checked in both debug and release builds, and cannot
/// be disabled. See [`debug_assert_eq!`] for assertions that are disabled in
/// release builds by default.
///
/// [`debug_assert_eq!`]: crate::debug_assert_eq
///
/// On panic, this macro will print the values of the expressions with their
/// debug representations.
///
Expand Down Expand Up @@ -64,6 +70,12 @@ macro_rules! assert_eq {

/// Asserts that two expressions are not equal to each other (using [`PartialEq`]).
///
/// Assertions are always checked in both debug and release builds, and cannot
/// be disabled. See [`debug_assert_ne!`] for assertions that are disabled in
/// release builds by default.
///
/// [`debug_assert_ne!`]: crate::debug_assert_ne
///
/// On panic, this macro will print the values of the expressions with their
/// debug representations.
///
Expand Down Expand Up @@ -122,6 +134,12 @@ macro_rules! assert_ne {
/// optional if guard can be used to add additional checks that must be true for the matched value,
/// otherwise this macro will panic.
///
/// Assertions are always checked in both debug and release builds, and cannot
/// be disabled. See [`debug_assert_matches!`] for assertions that are disabled in
/// release builds by default.
///
/// [`debug_assert_matches!`]: crate::assert_matches::debug_assert_matches
///
/// On panic, this macro will print the value of the expression with its debug representation.
///
/// Like [`assert!`], this macro has a second form, where a custom panic message can be provided.
Expand Down
Loading