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 093c526 commit ad305acCopy full SHA for ad305ac
src/libcollections/vec.rs
@@ -1804,14 +1804,15 @@ impl DrainRange for usize {
1804
#[unsafe_no_drop_flag]
1805
#[unstable(feature = "collections",
1806
reason = "recently added as part of collections reform 2")]
1807
-pub struct Drain<'a, T: 'a> {
+pub struct Drain<'a, T> {
1808
tail: usize,
1809
start: *const T,
1810
end: *const T,
1811
left: *const T,
1812
right: *const T,
1813
marker1: PhantomData<&'a ()>,
1814
- marker2: PhantomData<T>,
+ // Drain<T> contains functions to retrieve T but none to insert T.
1815
+ marker2: PhantomData<Fn() -> T>,
1816
}
1817
1818
unsafe impl<'a, T: Sync> Sync for Drain<'a, T> {}
0 commit comments