Skip to content

Commit afbd07a

Browse files
committed
Fix method receiver lint in uint doctests
1 parent ea4cb11 commit afbd07a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/num/uint_macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,7 @@ macro_rules! uint_impl {
11251125
/// ```
11261126
///
11271127
/// ```should_panic
1128-
#[doc = concat!("let _ = (", stringify!($SelfT), "::MAX).strict_sub_signed(-1);")]
1128+
#[doc = concat!("let _ = ", stringify!($SelfT), "::MAX.strict_sub_signed(-1);")]
11291129
/// ```
11301130
#[stable(feature = "strict_overflow_ops", since = "1.91.0")]
11311131
#[rustc_const_stable(feature = "strict_overflow_ops", since = "1.91.0")]
@@ -2433,7 +2433,7 @@ macro_rules! uint_impl {
24332433
///
24342434
/// ```
24352435
#[doc = concat!("assert_eq!(2", stringify!($SelfT), ".saturating_mul(10), 20);")]
2436-
#[doc = concat!("assert_eq!((", stringify!($SelfT), "::MAX).saturating_mul(10), ", stringify!($SelfT),"::MAX);")]
2436+
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MAX.saturating_mul(10), ", stringify!($SelfT),"::MAX);")]
24372437
/// ```
24382438
#[stable(feature = "wrapping", since = "1.7.0")]
24392439
#[rustc_const_stable(feature = "const_saturating_int_methods", since = "1.47.0")]

0 commit comments

Comments
 (0)