Skip to content

Commit e9ce036

Browse files
committed
Make documentation examples use new integer assoc consts
1 parent 548afdb commit e9ce036

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/libcore/hint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ use crate::intrinsics;
4343
///
4444
/// assert_eq!(div_1(7, 0), 7);
4545
/// assert_eq!(div_1(9, 1), 4);
46-
/// assert_eq!(div_1(11, std::u32::MAX), 0);
46+
/// assert_eq!(div_1(11, u32::MAX), 0);
4747
/// ```
4848
#[inline]
4949
#[stable(feature = "unreachable", since = "1.27.0")]

src/libcore/num/f32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ impl f32 {
470470
///
471471
/// let value = -128.9_f32;
472472
/// let rounded = unsafe { value.to_int_unchecked::<i8>() };
473-
/// assert_eq!(rounded, std::i8::MIN);
473+
/// assert_eq!(rounded, i8::MIN);
474474
/// ```
475475
///
476476
/// # Safety

src/libcore/num/f64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ impl f64 {
484484
///
485485
/// let value = -128.9_f32;
486486
/// let rounded = unsafe { value.to_int_unchecked::<i8>() };
487-
/// assert_eq!(rounded, std::i8::MIN);
487+
/// assert_eq!(rounded, i8::MIN);
488488
/// ```
489489
///
490490
/// # Safety

src/libcore/num/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ NonZeroI8 NonZeroI16 NonZeroI32 NonZeroI64 NonZeroI128 NonZeroIsize }
174174
/// let zero = Wrapping(0u32);
175175
/// let one = Wrapping(1u32);
176176
///
177-
/// assert_eq!(std::u32::MAX, (zero - one).0);
177+
/// assert_eq!(u32::MAX, (zero - one).0);
178178
/// ```
179179
#[stable(feature = "rust1", since = "1.0.0")]
180180
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default, Hash)]

src/libcore/time.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ impl Duration {
389389
/// use std::time::Duration;
390390
///
391391
/// assert_eq!(Duration::new(0, 0).checked_add(Duration::new(0, 1)), Some(Duration::new(0, 1)));
392-
/// assert_eq!(Duration::new(1, 0).checked_add(Duration::new(std::u64::MAX, 0)), None);
392+
/// assert_eq!(Duration::new(1, 0).checked_add(Duration::new(u64::MAX, 0)), None);
393393
/// ```
394394
#[stable(feature = "duration_checked_ops", since = "1.16.0")]
395395
#[inline]
@@ -460,7 +460,7 @@ impl Duration {
460460
/// use std::time::Duration;
461461
///
462462
/// assert_eq!(Duration::new(0, 500_000_001).checked_mul(2), Some(Duration::new(1, 2)));
463-
/// assert_eq!(Duration::new(std::u64::MAX - 1, 0).checked_mul(2), None);
463+
/// assert_eq!(Duration::new(u64::MAX - 1, 0).checked_mul(2), None);
464464
/// ```
465465
#[stable(feature = "duration_checked_ops", since = "1.16.0")]
466466
#[inline]

0 commit comments

Comments
 (0)