diff options
Diffstat (limited to 'library/core/src/slice/index.rs')
| -rw-r--r-- | library/core/src/slice/index.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/library/core/src/slice/index.rs b/library/core/src/slice/index.rs index aafa19c0dd3..644d22897de 100644 --- a/library/core/src/slice/index.rs +++ b/library/core/src/slice/index.rs @@ -239,6 +239,7 @@ unsafe impl<T> SliceIndex<[T]> for usize { } #[inline] + #[track_caller] unsafe fn get_unchecked(self, slice: *const [T]) -> *const T { assert_unsafe_precondition!( check_language_ub, @@ -258,6 +259,7 @@ unsafe impl<T> SliceIndex<[T]> for usize { } #[inline] + #[track_caller] unsafe fn get_unchecked_mut(self, slice: *mut [T]) -> *mut T { assert_unsafe_precondition!( check_library_ub, @@ -307,6 +309,7 @@ unsafe impl<T> SliceIndex<[T]> for ops::IndexRange { } #[inline] + #[track_caller] unsafe fn get_unchecked(self, slice: *const [T]) -> *const [T] { assert_unsafe_precondition!( check_library_ub, @@ -321,6 +324,7 @@ unsafe impl<T> SliceIndex<[T]> for ops::IndexRange { } #[inline] + #[track_caller] unsafe fn get_unchecked_mut(self, slice: *mut [T]) -> *mut [T] { assert_unsafe_precondition!( check_library_ub, @@ -386,6 +390,7 @@ unsafe impl<T> SliceIndex<[T]> for ops::Range<usize> { } #[inline] + #[track_caller] unsafe fn get_unchecked(self, slice: *const [T]) -> *const [T] { assert_unsafe_precondition!( check_library_ub, @@ -410,6 +415,7 @@ unsafe impl<T> SliceIndex<[T]> for ops::Range<usize> { } #[inline] + #[track_caller] unsafe fn get_unchecked_mut(self, slice: *mut [T]) -> *mut [T] { assert_unsafe_precondition!( check_library_ub, |
