about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/doc/tarpl/vec-drain.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/doc/tarpl/vec-drain.md b/src/doc/tarpl/vec-drain.md
index b6b28266600..23671978369 100644
--- a/src/doc/tarpl/vec-drain.md
+++ b/src/doc/tarpl/vec-drain.md
@@ -8,6 +8,9 @@ untouched. For now we'll only implement the "basic" full-range version.
 use std::marker::PhantomData;
 
 struct Drain<'a, T: 'a> {
+    // Need to bound the lifetime here, so we do it with `&'a mut Vec<T>`
+    // because that's semantically what we contain. We're "just" calling
+    // `pop()` and `remove(0)`.
     vec: PhantomData<&'a mut Vec<T>>
     start: *const T,
     end: *const T,