diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 0c0004fb00fa..b30ceda6a88d 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -655,6 +655,7 @@ impl [T] { #[stable(feature = "rust1", since = "1.0.0")] #[inline] #[must_use] + #[track_caller] pub unsafe fn get_unchecked(&self, index: I) -> &I::Output where I: SliceIndex, @@ -697,6 +698,7 @@ impl [T] { #[stable(feature = "rust1", since = "1.0.0")] #[inline] #[must_use] + #[track_caller] pub unsafe fn get_unchecked_mut(&mut self, index: I) -> &mut I::Output where I: SliceIndex, @@ -4562,6 +4564,7 @@ impl [T] { /// [undefined behavior]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html #[unstable(feature = "get_many_mut", issue = "104642")] #[inline] + #[track_caller] pub unsafe fn get_many_unchecked_mut( &mut self, indices: [I; N],