Skip to content

Commit b2f5b5a

Browse files
committed
Indicate where std::slice structs originate from.
1 parent b5ad277 commit b2f5b5a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/libcore/slice.rs

+10
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,8 @@ macro_rules! make_mut_slice {
902902

903903
/// Immutable slice iterator
904904
///
905+
/// This struct is created by the [`iter`] method on [slices].
906+
///
905907
/// # Examples
906908
///
907909
/// Basic usage:
@@ -915,6 +917,9 @@ macro_rules! make_mut_slice {
915917
/// println!("{}", element);
916918
/// }
917919
/// ```
920+
///
921+
/// [`iter`]: ../../std/primitive.slice.html#method.iter
922+
/// [slices]: ../../std/primitive.slice.html
918923
#[stable(feature = "rust1", since = "1.0.0")]
919924
pub struct Iter<'a, T: 'a> {
920925
ptr: *const T,
@@ -993,6 +998,8 @@ impl<'a, T> Clone for Iter<'a, T> {
993998

994999
/// Mutable slice iterator.
9951000
///
1001+
/// This struct is created by the [`iter_mut`] method on [slices].
1002+
///
9961003
/// # Examples
9971004
///
9981005
/// Basic usage:
@@ -1010,6 +1017,9 @@ impl<'a, T> Clone for Iter<'a, T> {
10101017
/// // We now have "[2, 3, 4]":
10111018
/// println!("{:?}", slice);
10121019
/// ```
1020+
///
1021+
/// [`iter_mut`]: ../../std/primitive.slice.html#method.iter_mut
1022+
/// [slices]: ../../std/primitive.slice.html
10131023
#[stable(feature = "rust1", since = "1.0.0")]
10141024
pub struct IterMut<'a, T: 'a> {
10151025
ptr: *mut T,

0 commit comments

Comments
 (0)