]> git.lizzy.rs Git - rust.git/commitdiff
Mention where `std::vec` structs originate from.
authorCorey Farwell <coreyf@rwell.org>
Thu, 14 Jul 2016 13:34:43 +0000 (09:34 -0400)
committerCorey Farwell <coreyf@rwell.org>
Fri, 15 Jul 2016 00:32:09 +0000 (20:32 -0400)
src/libcollections/vec.rs

index 9797113b8ad66450ac1934404e9acad9c112456a..da56b21cf0c050c8a2c0bd3a1282e583e47f789f 100644 (file)
@@ -1603,6 +1603,12 @@ fn from_iter<I: IntoIterator<Item = T>>(it: I) -> Cow<'a, [T]> {
 ////////////////////////////////////////////////////////////////////////////////
 
 /// An iterator that moves out of a vector.
+///
+/// This `struct` is created by the `into_iter` method on [`Vec`][`Vec`] (provided
+/// by the [`IntoIterator`] trait).
+///
+/// [`Vec`]: struct.Vec.html
+/// [`IntoIterator`]: ../../std/iter/trait.IntoIterator.html
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct IntoIter<T> {
     _buf: RawVec<T>,
@@ -1710,6 +1716,11 @@ fn drop(&mut self) {
 }
 
 /// A draining iterator for `Vec<T>`.
+///
+/// This `struct` is created by the [`drain`] method on [`Vec`].
+///
+/// [`drain`]: struct.Vec.html#method.drain
+/// [`Vec`]: struct.Vec.html
 #[stable(feature = "drain", since = "1.6.0")]
 pub struct Drain<'a, T: 'a> {
     /// Index of tail to preserve