@@ -894,9 +894,15 @@ impl<A> ExactSizeIterator for Item<A> {}
894
894
impl < A > FusedIterator for Item < A > { }
895
895
unsafe impl < A > TrustedLen for Item < A > { }
896
896
897
- /// An iterator over a reference of the contained item in an [`Option`].
897
+ /// An iterator over a reference to the [`Some`] variant of an [`Option`].
898
+ ///
899
+ /// The iterator yields one value if the [`Option`] is a [`Some`], otherwise none.
900
+ ///
901
+ /// This `struct` is created by the [`Option::iter`] function.
898
902
///
899
903
/// [`Option`]: enum.Option.html
904
+ /// [`Some`]: enum.Option.html#variant.Some
905
+ /// [`Option::iter`]: enum.Option.html#method.iter
900
906
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
901
907
#[ derive( Debug ) ]
902
908
pub struct Iter < ' a , A : ' a > { inner : Item < & ' a A > }
@@ -933,9 +939,15 @@ impl<'a, A> Clone for Iter<'a, A> {
933
939
}
934
940
}
935
941
936
- /// An iterator over a mutable reference of the contained item in an [`Option`].
942
+ /// An iterator over a mutable reference to the [`Some`] variant of an [`Option`].
943
+ ///
944
+ /// The iterator yields one value if the [`Option`] is a [`Some`], otherwise none.
945
+ ///
946
+ /// This `struct` is created by the [`Option::iter_mut`] function.
937
947
///
938
948
/// [`Option`]: enum.Option.html
949
+ /// [`Some`]: enum.Option.html#variant.Some
950
+ /// [`Option::iter_mut`]: enum.Option.html#method.iter_mut
939
951
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
940
952
#[ derive( Debug ) ]
941
953
pub struct IterMut < ' a , A : ' a > { inner : Item < & ' a mut A > }
@@ -964,9 +976,15 @@ impl<'a, A> FusedIterator for IterMut<'a, A> {}
964
976
#[ unstable( feature = "trusted_len" , issue = "37572" ) ]
965
977
unsafe impl < ' a , A > TrustedLen for IterMut < ' a , A > { }
966
978
967
- /// An iterator over the item contained inside an [`Option`].
979
+ /// An iterator over the value in [`Some`] variant of an [`Option`].
980
+ ///
981
+ /// The iterator yields one value if the [`Option`] is a [`Some`], otherwise none.
982
+ ///
983
+ /// This `struct` is created by the [`Option::into_iter`] function.
968
984
///
969
985
/// [`Option`]: enum.Option.html
986
+ /// [`Some`]: enum.Option.html#variant.Some
987
+ /// [`Option::into_iter`]: enum.Option.html#method.into_iter
970
988
#[ derive( Clone , Debug ) ]
971
989
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
972
990
pub struct IntoIter < A > { inner : Item < A > }
0 commit comments