about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authormitchmindtree <mitchell.nordine@gmail.com>2016-07-09 00:35:08 +1000
committermitchmindtree <mitchell.nordine@gmail.com>2016-07-09 00:35:08 +1000
commitb02b38e1c4f7c8075c92d41e9e08bf2a20982f66 (patch)
treea487847033f09eb9db43b8ed8a9b51d43366676f /src/libstd/sync
parentb354887180b665441dd6e3ea51b2651085de88f9 (diff)
downloadrust-b02b38e1c4f7c8075c92d41e9e08bf2a20982f66.tar.gz
rust-b02b38e1c4f7c8075c92d41e9e08bf2a20982f66.zip
Add the unstable attribute to the new mpsc::Receiver::try_iter API
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/mpsc/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs
index 51a820b2e91..2d2bded9f60 100644
--- a/src/libstd/sync/mpsc/mod.rs
+++ b/src/libstd/sync/mpsc/mod.rs
@@ -317,6 +317,7 @@ pub struct Iter<'a, T: 'a> {
 ///
 /// This Iterator will never block the caller in order to wait for data to
 /// become available. Instead, it will return `None`.
+#[unstable(feature = "receiver_try_iter")]
 pub struct TryIter<'a, T: 'a> {
     rx: &'a Receiver<T>
 }
@@ -997,6 +998,7 @@ impl<T> Receiver<T> {
     /// It will return `None` if there are no more pending values or if the
     /// channel has hung up. The iterator will never `panic!` or block the
     /// user by waiting for values.
+    #[unstable(feature = "receiver_try_iter")]
     pub fn try_iter(&self) -> TryIter<T> {
         TryIter { rx: self }
     }
@@ -1096,6 +1098,7 @@ impl<'a, T> Iterator for Iter<'a, T> {
     fn next(&mut self) -> Option<T> { self.rx.recv().ok() }
 }
 
+#[unstable(feature = "receiver_try_iter")]
 impl<'a, T> Iterator for TryIter<'a, T> {
     type Item = T;