]> git.lizzy.rs Git - rust.git/commitdiff
Indicate where `std::slice` structs originate from.
authorCorey Farwell <coreyf@rwell.org>
Sun, 17 Jul 2016 01:42:11 +0000 (21:42 -0400)
committerCorey Farwell <coreyf@rwell.org>
Sun, 17 Jul 2016 13:16:47 +0000 (09:16 -0400)
src/libcore/slice.rs

index 4f11cac4eb2bec7b7e7ba6c4346e78fd5f3ed354..d8a11581c3b69be0de75868e938add9a8d135a20 100644 (file)
@@ -902,6 +902,8 @@ macro_rules! make_mut_slice {
 
 /// Immutable slice iterator
 ///
+/// This struct is created by the [`iter`] method on [slices].
+///
 /// # Examples
 ///
 /// Basic usage:
@@ -915,6 +917,9 @@ macro_rules! make_mut_slice {
 ///     println!("{}", element);
 /// }
 /// ```
+///
+/// [`iter`]: ../../std/primitive.slice.html#method.iter
+/// [slices]: ../../std/primitive.slice.html
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct Iter<'a, T: 'a> {
     ptr: *const T,
@@ -993,6 +998,8 @@ fn clone(&self) -> Iter<'a, T> { Iter { ptr: self.ptr, end: self.end, _marker: s
 
 /// Mutable slice iterator.
 ///
+/// This struct is created by the [`iter_mut`] method on [slices].
+///
 /// # Examples
 ///
 /// Basic usage:
@@ -1010,6 +1017,9 @@ fn clone(&self) -> Iter<'a, T> { Iter { ptr: self.ptr, end: self.end, _marker: s
 /// // We now have "[2, 3, 4]":
 /// println!("{:?}", slice);
 /// ```
+///
+/// [`iter_mut`]: ../../std/primitive.slice.html#method.iter_mut
+/// [slices]: ../../std/primitive.slice.html
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct IterMut<'a, T: 'a> {
     ptr: *mut T,