about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorSeo Sanghyeon <sanxiyn@gmail.com>2016-07-18 22:44:56 +0900
committerGitHub <noreply@github.com>2016-07-18 22:44:56 +0900
commitb7138494effd565fb9efe5ef11df4f64b85b6321 (patch)
tree6d9ab1d8d03dd3711e0ee40c4f01c3e37785a321 /src/libcore
parent15715c83770a752914834c16736a19b5a957d507 (diff)
parentb2f5b5a812b0b9a8d4e5e0dec16ba44ef16d3e55 (diff)
downloadrust-b7138494effd565fb9efe5ef11df4f64b85b6321.tar.gz
rust-b7138494effd565fb9efe5ef11df4f64b85b6321.zip
Rollup merge of #34875 - frewsxcv:std-slice-struct, r=GuillaumeGomez
Indicate where `std::slice` structs originate from.

None
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/slice.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs
index 4f11cac4eb2..d8a11581c3b 100644
--- a/src/libcore/slice.rs
+++ b/src/libcore/slice.rs
@@ -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 @@ impl<'a, T> Clone for Iter<'a, T> {
 
 /// Mutable slice iterator.
 ///
+/// This struct is created by the [`iter_mut`] method on [slices].
+///
 /// # Examples
 ///
 /// Basic usage:
@@ -1010,6 +1017,9 @@ impl<'a, T> Clone for Iter<'a, T> {
 /// // 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,