about summary refs log tree commit diff
path: root/src/libcore/ptr/mod.rs
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2020-06-02 07:59:11 +0000
committerLzu Tao <taolzu@gmail.com>2020-06-10 01:35:47 +0000
commitfff822fead6249671cbcb090b24bce58fab38de0 (patch)
tree417a72d52d12d147a03535fe7cbe465b3bcdb695 /src/libcore/ptr/mod.rs
parent283522400b5c13dfdf2b7e608e63a70ee8e3d7af (diff)
downloadrust-fff822fead6249671cbcb090b24bce58fab38de0.tar.gz
rust-fff822fead6249671cbcb090b24bce58fab38de0.zip
Migrate to numeric associated consts
Diffstat (limited to 'src/libcore/ptr/mod.rs')
-rw-r--r--src/libcore/ptr/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ptr/mod.rs b/src/libcore/ptr/mod.rs
index ecc70adda41..57d0008e6f8 100644
--- a/src/libcore/ptr/mod.rs
+++ b/src/libcore/ptr/mod.rs
@@ -1128,7 +1128,7 @@ pub(crate) unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usize {
                 //
                 // Note, that we use wrapping operations here intentionally – the original formula
                 // uses e.g., subtraction `mod n`. It is entirely fine to do them `mod
-                // usize::max_value()` instead, because we take the result `mod n` at the end
+                // usize::MAX` instead, because we take the result `mod n` at the end
                 // anyway.
                 inverse = inverse.wrapping_mul(2usize.wrapping_sub(x.wrapping_mul(inverse)));
                 if going_mod >= m {
@@ -1193,7 +1193,7 @@ pub(crate) unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usize {
     }
 
     // Cannot be aligned at all.
-    usize::max_value()
+    usize::MAX
 }
 
 /// Compares raw pointers for equality.