about summary refs log tree commit diff
path: root/library/alloc/src/vec/splice.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/alloc/src/vec/splice.rs')
-rw-r--r--library/alloc/src/vec/splice.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/alloc/src/vec/splice.rs b/library/alloc/src/vec/splice.rs
index 9e36377c148..ca5cb17f8bf 100644
--- a/library/alloc/src/vec/splice.rs
+++ b/library/alloc/src/vec/splice.rs
@@ -52,6 +52,7 @@ impl<I: Iterator, A: Allocator> ExactSizeIterator for Splice<'_, I, A> {}
 
 #[stable(feature = "vec_splice", since = "1.21.0")]
 impl<I: Iterator, A: Allocator> Drop for Splice<'_, I, A> {
+    #[track_caller]
     fn drop(&mut self) {
         self.drain.by_ref().for_each(drop);
         // At this point draining is done and the only remaining tasks are splicing
@@ -123,6 +124,7 @@ impl<T, A: Allocator> Drain<'_, T, A> {
     }
 
     /// Makes room for inserting more elements before the tail.
+    #[track_caller]
     unsafe fn move_tail(&mut self, additional: usize) {
         let vec = unsafe { self.vec.as_mut() };
         let len = self.tail_start + self.tail_len;