about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIrfan Hudda <irfanhudda@gmail.com>2017-04-01 21:58:30 +0530
committerIrfan Hudda <irfanhudda@gmail.com>2017-04-01 21:58:30 +0530
commit128a313ee26b06b32e6980b4092435d7d352347d (patch)
treecd3a3387f734ea358104e08854c0f2d3587eae5f
parent5e122f59ba23494d460466cca53c71646d99c767 (diff)
downloadrust-128a313ee26b06b32e6980b4092435d7d352347d.tar.gz
rust-128a313ee26b06b32e6980b4092435d7d352347d.zip
Improve docs of core::option::IntoIter
-rw-r--r--src/libcore/option.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index d997f3592fd..027d370f88f 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -964,9 +964,15 @@ impl<'a, A> FusedIterator for IterMut<'a, A> {}
 #[unstable(feature = "trusted_len", issue = "37572")]
 unsafe impl<'a, A> TrustedLen for IterMut<'a, A> {}
 
-/// An iterator over the item contained inside an [`Option`].
+/// An iterator over the value in [`Some`] variant of an [`Option`].
+///
+/// The iterator yields one value if the [`Option`] is a [`Some`] variant, otherwise none.
+///
+/// This `struct` is created by [`Option::into_iter`] function.
 ///
 /// [`Option`]: enum.Option.html
+/// [`Some`]: enum.Option.html#variant.Some
+/// [`Option::into_iter`]: enum.Option.html#method.into_iter
 #[derive(Clone, Debug)]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct IntoIter<A> { inner: Item<A> }