@@ -124,13 +124,15 @@ macro_rules! assert_ne {
124
124
/// # Examples
125
125
///
126
126
/// ```
127
+ /// #![feature(assert_matches)]
128
+ ///
127
129
/// let a = 1u32.checked_add(2);
128
130
/// let b = 1u32.checked_sub(2);
129
131
/// assert_matches!(a, Some(_));
130
132
/// assert_matches!(b, None);
131
133
///
132
134
/// let c = Ok("abc".to_string());
133
- /// assert_matches!(a , Ok(x) | Err(x) if x.len() < 100);
135
+ /// assert_matches!(c , Ok(x) | Err(x) if x.len() < 100);
134
136
/// ```
135
137
#[ macro_export]
136
138
#[ unstable( feature = "assert_matches" , issue = "none" ) ]
@@ -279,13 +281,15 @@ macro_rules! debug_assert_ne {
279
281
/// # Examples
280
282
///
281
283
/// ```
284
+ /// #![feature(assert_matches)]
285
+ ///
282
286
/// let a = 1u32.checked_add(2);
283
287
/// let b = 1u32.checked_sub(2);
284
288
/// debug_assert_matches!(a, Some(_));
285
289
/// debug_assert_matches!(b, None);
286
290
///
287
291
/// let c = Ok("abc".to_string());
288
- /// debug_assert_matches!(a , Ok(x) | Err(x) if x.len() < 100);
292
+ /// debug_assert_matches!(c , Ok(x) | Err(x) if x.len() < 100);
289
293
/// ```
290
294
#[ macro_export]
291
295
#[ unstable( feature = "assert_matches" , issue = "none" ) ]
0 commit comments