File tree 1 file changed +3
-0
lines changed 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -2524,12 +2524,14 @@ pub(crate) use assert_unsafe_precondition;
2524
2524
2525
2525
/// Checks whether `ptr` is properly aligned with respect to
2526
2526
/// `align_of::<T>()`.
2527
+ #[ inline]
2527
2528
pub ( crate ) fn is_aligned_and_not_null < T > ( ptr : * const T ) -> bool {
2528
2529
!ptr. is_null ( ) && ptr. is_aligned ( )
2529
2530
}
2530
2531
2531
2532
/// Checks whether an allocation of `len` instances of `T` exceeds
2532
2533
/// the maximum allowed allocation size.
2534
+ #[ inline]
2533
2535
pub ( crate ) fn is_valid_allocation_size < T > ( len : usize ) -> bool {
2534
2536
let max_len = const {
2535
2537
let size = crate :: mem:: size_of :: < T > ( ) ;
@@ -2540,6 +2542,7 @@ pub(crate) fn is_valid_allocation_size<T>(len: usize) -> bool {
2540
2542
2541
2543
/// Checks whether the regions of memory starting at `src` and `dst` of size
2542
2544
/// `count * size_of::<T>()` do *not* overlap.
2545
+ #[ inline]
2543
2546
pub ( crate ) fn is_nonoverlapping < T > ( src : * const T , dst : * const T , count : usize ) -> bool {
2544
2547
let src_usize = src. addr ( ) ;
2545
2548
let dst_usize = dst. addr ( ) ;
You can’t perform that action at this time.
0 commit comments