File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 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;
25242524
25252525/// Checks whether `ptr` is properly aligned with respect to
25262526/// `align_of::<T>()`.
2527+ #[ inline]
25272528pub ( crate ) fn is_aligned_and_not_null < T > ( ptr : * const T ) -> bool {
25282529 !ptr. is_null ( ) && ptr. is_aligned ( )
25292530}
25302531
25312532/// Checks whether an allocation of `len` instances of `T` exceeds
25322533/// the maximum allowed allocation size.
2534+ #[ inline]
25332535pub ( crate ) fn is_valid_allocation_size < T > ( len : usize ) -> bool {
25342536 let max_len = const {
25352537 let size = crate :: mem:: size_of :: < T > ( ) ;
@@ -2540,6 +2542,7 @@ pub(crate) fn is_valid_allocation_size<T>(len: usize) -> bool {
25402542
25412543/// Checks whether the regions of memory starting at `src` and `dst` of size
25422544/// `count * size_of::<T>()` do *not* overlap.
2545+ #[ inline]
25432546pub ( crate ) fn is_nonoverlapping < T > ( src : * const T , dst : * const T , count : usize ) -> bool {
25442547 let src_usize = src. addr ( ) ;
25452548 let dst_usize = dst. addr ( ) ;
You can’t perform that action at this time.
0 commit comments