about summary refs log tree commit diff
path: root/src/libcollections/enum_set.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcollections/enum_set.rs')
-rw-r--r--src/libcollections/enum_set.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libcollections/enum_set.rs b/src/libcollections/enum_set.rs
index da533d34703..5c37be188fe 100644
--- a/src/libcollections/enum_set.rs
+++ b/src/libcollections/enum_set.rs
@@ -257,6 +257,8 @@ impl<E:CLike> FromIterator<E> for EnumSet<E> {
     }
 }
 
+// NOTE(stage0): remove impl after a snapshot
+#[cfg(stage0)]
 impl<'a, E> IntoIterator for &'a EnumSet<E> where E: CLike {
     type IntoIter = Iter<E>;
 
@@ -265,6 +267,16 @@ impl<'a, E> IntoIterator for &'a EnumSet<E> where E: CLike {
     }
 }
 
+#[cfg(not(stage0))]  // NOTE(stage0): remove cfg after a snapshot
+impl<'a, E> IntoIterator for &'a EnumSet<E> where E: CLike {
+    type Item = E;
+    type IntoIter = Iter<E>;
+
+    fn into_iter(self) -> Iter<E> {
+        self.iter()
+    }
+}
+
 impl<E:CLike> Extend<E> for EnumSet<E> {
     fn extend<I: Iterator<Item=E>>(&mut self, iterator: I) {
         for element in iterator {