about summary refs log tree commit diff
path: root/src/libcore/ptr/const_ptr.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-06-12 13:10:57 +0000
committerbors <bors@rust-lang.org>2020-06-12 13:10:57 +0000
commit7c78a5f97de07a185eebae5a5de436c80d8ba9d4 (patch)
treee5475f282387bca43e2085d44537fdfbe69ef98d /src/libcore/ptr/const_ptr.rs
parent59493917be3e87e1dfb44a9ccb66a9f9b17228e6 (diff)
parent77ede48ada25295cb90e520f52c1cbe653982f8a (diff)
Auto merge of #73276 - Dylan-DPC:rollup-hfd81qw, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #72906 (Migrate to numeric associated consts)
 - #73178 (expand: More precise locations for expansion-time lints)
 - #73225 (Allow inference regions when relating consts)
 - #73236 (Clean up E0666 explanation)
 - #73273 (Fix Zulip pings)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libcore/ptr/const_ptr.rs')
-rw-r--r--src/libcore/ptr/const_ptr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ptr/const_ptr.rs b/src/libcore/ptr/const_ptr.rs
index 835183d171a..e39d18d7733 100644
--- a/src/libcore/ptr/const_ptr.rs
+++ b/src/libcore/ptr/const_ptr.rs
@@ -291,7 +291,7 @@ impl<T: ?Sized> *const T {
         T: Sized,
     {
         let pointee_size = mem::size_of::<T>();
-        assert!(0 < pointee_size && pointee_size <= isize::max_value() as usize);
+        assert!(0 < pointee_size && pointee_size <= isize::MAX as usize);
         intrinsics::ptr_offset_from(self, origin)
     }
 
@@ -336,7 +336,7 @@ impl<T: ?Sized> *const T {
         T: Sized,
     {
         let pointee_size = mem::size_of::<T>();
-        assert!(0 < pointee_size && pointee_size <= isize::max_value() as usize);
+        assert!(0 < pointee_size && pointee_size <= isize::MAX as usize);
 
         let d = isize::wrapping_sub(self as _, origin as _);
         d.wrapping_div(pointee_size as _)