diff options
| author | Lzu Tao <taolzu@gmail.com> | 2020-06-02 07:59:11 +0000 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2020-06-10 01:35:47 +0000 |
| commit | fff822fead6249671cbcb090b24bce58fab38de0 (patch) | |
| tree | 417a72d52d12d147a03535fe7cbe465b3bcdb695 /src/libcore/ptr/const_ptr.rs | |
| parent | 283522400b5c13dfdf2b7e608e63a70ee8e3d7af (diff) | |
| download | rust-fff822fead6249671cbcb090b24bce58fab38de0.tar.gz rust-fff822fead6249671cbcb090b24bce58fab38de0.zip | |
Migrate to numeric associated consts
Diffstat (limited to 'src/libcore/ptr/const_ptr.rs')
| -rw-r--r-- | src/libcore/ptr/const_ptr.rs | 4 |
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 _) |
