@@ -3852,8 +3852,8 @@ unsafe impl<'a, T> TrustedRandomAccess for ExactChunksMut<'a, T> {
3852
3852
/// them from other data. You can obtain a pointer that is usable as `data`
3853
3853
/// for zero-length slices using [`NonNull::dangling()`].
3854
3854
///
3855
- /// The total size of the slice must be no larger than `isize::MAX` **bytes**
3856
- /// in memory. See the safety documentation of [`pointer::offset`].
3855
+ /// The total size of the slice must lower than `isize::MAX` **bytes** in
3856
+ /// memory. See the safety documentation of [`pointer::offset`].
3857
3857
///
3858
3858
/// # Caveat
3859
3859
///
@@ -3881,7 +3881,7 @@ unsafe impl<'a, T> TrustedRandomAccess for ExactChunksMut<'a, T> {
3881
3881
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
3882
3882
pub unsafe fn from_raw_parts < ' a , T > ( data : * const T , len : usize ) -> & ' a [ T ] {
3883
3883
debug_assert ! ( data as usize % mem:: align_of:: <T >( ) == 0 , "attempt to create unaligned slice" ) ;
3884
- debug_assert ! ( len * mem:: size_of:: <T >( ) <= isize :: MAX as usize ,
3884
+ debug_assert ! ( len * mem:: size_of:: <T >( ) < isize :: MAX as usize ,
3885
3885
"attempt to create slice covering half the address space" ) ;
3886
3886
Repr { raw : FatPtr { data, len } } . rust
3887
3887
}
@@ -3892,8 +3892,8 @@ pub unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] {
3892
3892
/// This function is unsafe for the same reasons as [`from_raw_parts`], as well
3893
3893
/// as not being able to provide a non-aliasing guarantee of the returned
3894
3894
/// mutable slice. `data` must be non-null and aligned even for zero-length
3895
- /// slices as with [`from_raw_parts`]. The total size of the slice must be no
3896
- /// larger than `isize::MAX` **bytes** in memory. See the safety documentation
3895
+ /// slices as with [`from_raw_parts`]. The total size of the slice must be
3896
+ /// lower than `isize::MAX` **bytes** in memory. See the safety documentation
3897
3897
/// of [`pointer::offset`].
3898
3898
///
3899
3899
/// See the documentation of [`from_raw_parts`] for more details.
@@ -3904,7 +3904,7 @@ pub unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] {
3904
3904
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
3905
3905
pub unsafe fn from_raw_parts_mut < ' a , T > ( data : * mut T , len : usize ) -> & ' a mut [ T ] {
3906
3906
debug_assert ! ( data as usize % mem:: align_of:: <T >( ) == 0 , "attempt to create unaligned slice" ) ;
3907
- debug_assert ! ( len * mem:: size_of:: <T >( ) <= isize :: MAX as usize ,
3907
+ debug_assert ! ( len * mem:: size_of:: <T >( ) < isize :: MAX as usize ,
3908
3908
"attempt to create slice covering half the address space" ) ;
3909
3909
Repr { raw : FatPtr { data, len} } . rust_mut
3910
3910
}
0 commit comments