We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a36ea7 commit 06ded9cCopy full SHA for 06ded9c
src/doc/tarpl/vec-drain.md
@@ -8,6 +8,9 @@ untouched. For now we'll only implement the "basic" full-range version.
8
use std::marker::PhantomData;
9
10
struct Drain<'a, T: 'a> {
11
+ // Need to bound the lifetime here, so we do it with `&'a mut Vec<T>`
12
+ // because that's semantically what we contain. We're "just" calling
13
+ // `pop()` and `remove(0)`.
14
vec: PhantomData<&'a mut Vec<T>>
15
start: *const T,
16
end: *const T,
0 commit comments