@@ -124,6 +124,8 @@ macro_rules! assert_ne {
124124 } ;
125125}
126126
127+ // FIXME add back debug_assert_matches doc link after bootstrap.
128+
127129/// Asserts that an expression matches the provided pattern.
128130///
129131/// This macro is generally preferable to `assert!(matches!(value, pattern))`, because it can print
@@ -135,11 +137,9 @@ macro_rules! assert_ne {
135137/// otherwise this macro will panic.
136138///
137139/// Assertions are always checked in both debug and release builds, and cannot
138- /// be disabled. See [ `debug_assert_matches!`] for assertions that are disabled in
140+ /// be disabled. See `debug_assert_matches!` for assertions that are disabled in
139141/// release builds by default.
140142///
141- /// [`debug_assert_matches!`]: crate::assert_matches::debug_assert_matches
142- ///
143143/// On panic, this macro will print the value of the expression with its debug representation.
144144///
145145/// Like [`assert!`], this macro has a second form, where a custom panic message can be provided.
@@ -149,7 +149,7 @@ macro_rules! assert_ne {
149149/// ```
150150/// #![feature(assert_matches)]
151151///
152- /// use std::assert_matches::assert_matches ;
152+ /// use std::assert_matches;
153153///
154154/// let a = Some(345);
155155/// let b = Some(56);
@@ -382,7 +382,7 @@ macro_rules! debug_assert_ne {
382382/// ```
383383/// #![feature(assert_matches)]
384384///
385- /// use std::assert_matches:: debug_assert_matches;
385+ /// use std::debug_assert_matches;
386386///
387387/// let a = Some(345);
388388/// let b = Some(56);
@@ -404,7 +404,7 @@ macro_rules! debug_assert_ne {
404404#[ rustc_macro_transparency = "semiopaque" ]
405405pub macro debug_assert_matches ( $( $arg: tt) * ) {
406406 if $crate:: cfg!( debug_assertions) {
407- $crate:: assert_matches:: assert_matches !( $( $arg) * ) ;
407+ $crate:: assert_matches!( $( $arg) * ) ;
408408 }
409409}
410410
0 commit comments