about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-21 00:07:29 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-21 09:28:07 -0800
commitdbeef0edb2d25a3ff321d8e09532f053b5ef2c07 (patch)
tree9ac43217e9134d908926c2aa7bfda279582f1ee6 /src/libcollections
parentb084cda4e9e0540b67d5db728b58acf8afba9f6e (diff)
parent84086c464f537591f0e4629676b3fc75517492ab (diff)
downloadrust-dbeef0edb2d25a3ff321d8e09532f053b5ef2c07.tar.gz
rust-dbeef0edb2d25a3ff321d8e09532f053b5ef2c07.zip
rollup merge of #19972: alexcrichton/snapshots
Conflicts:
	src/libcollections/string.rs
	src/libcollections/vec.rs
	src/snapshots.txt
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/btree/set.rs96
-rw-r--r--src/libcollections/enum_set.rs36
-rw-r--r--src/libcollections/string.rs21
-rw-r--r--src/libcollections/vec.rs14
4 files changed, 0 insertions, 167 deletions
diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs
index 890d9be39f9..e4328a3cb20 100644
--- a/src/libcollections/btree/set.rs
+++ b/src/libcollections/btree/set.rs
@@ -448,30 +448,6 @@ impl<T: Ord> Default for BTreeSet<T> {
 }
 
 #[unstable = "matches collection reform specification, waiting for dust to settle"]
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl<T: Ord + Clone> Sub<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
-    /// Returns the difference of `self` and `rhs` as a new `BTreeSet<T>`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use std::collections::BTreeSet;
-    ///
-    /// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
-    /// let b: BTreeSet<int> = vec![3,4,5].into_iter().collect();
-    ///
-    /// let result: BTreeSet<int> = a - b;
-    /// let result_vec: Vec<int> = result.into_iter().collect();
-    /// assert_eq!(result_vec, vec![1,2]);
-    /// ```
-    fn sub(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
-        self.difference(rhs).cloned().collect()
-    }
-}
-
-#[unstable = "matches collection reform specification, waiting for dust to settle"]
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl<'a, 'b, T: Ord + Clone> Sub<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeSet<T> {
     /// Returns the difference of `self` and `rhs` as a new `BTreeSet<T>`.
     ///
@@ -493,30 +469,6 @@ impl<'a, 'b, T: Ord + Clone> Sub<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeSet<
 }
 
 #[unstable = "matches collection reform specification, waiting for dust to settle"]
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl<T: Ord + Clone> BitXor<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
-    /// Returns the symmetric difference of `self` and `rhs` as a new `BTreeSet<T>`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use std::collections::BTreeSet;
-    ///
-    /// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
-    /// let b: BTreeSet<int> = vec![2,3,4].into_iter().collect();
-    ///
-    /// let result: BTreeSet<int> = a ^ b;
-    /// let result_vec: Vec<int> = result.into_iter().collect();
-    /// assert_eq!(result_vec, vec![1,4]);
-    /// ```
-    fn bitxor(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
-        self.symmetric_difference(rhs).cloned().collect()
-    }
-}
-
-#[unstable = "matches collection reform specification, waiting for dust to settle"]
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl<'a, 'b, T: Ord + Clone> BitXor<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeSet<T> {
     /// Returns the symmetric difference of `self` and `rhs` as a new `BTreeSet<T>`.
     ///
@@ -538,30 +490,6 @@ impl<'a, 'b, T: Ord + Clone> BitXor<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeS
 }
 
 #[unstable = "matches collection reform specification, waiting for dust to settle"]
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl<T: Ord + Clone> BitAnd<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
-    /// Returns the intersection of `self` and `rhs` as a new `BTreeSet<T>`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use std::collections::BTreeSet;
-    ///
-    /// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
-    /// let b: BTreeSet<int> = vec![2,3,4].into_iter().collect();
-    ///
-    /// let result: BTreeSet<int> = a & b;
-    /// let result_vec: Vec<int> = result.into_iter().collect();
-    /// assert_eq!(result_vec, vec![2,3]);
-    /// ```
-    fn bitand(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
-        self.intersection(rhs).cloned().collect()
-    }
-}
-
-#[unstable = "matches collection reform specification, waiting for dust to settle"]
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl<'a, 'b, T: Ord + Clone> BitAnd<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeSet<T> {
     /// Returns the intersection of `self` and `rhs` as a new `BTreeSet<T>`.
     ///
@@ -583,30 +511,6 @@ impl<'a, 'b, T: Ord + Clone> BitAnd<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeS
 }
 
 #[unstable = "matches collection reform specification, waiting for dust to settle"]
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl<T: Ord + Clone> BitOr<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
-    /// Returns the union of `self` and `rhs` as a new `BTreeSet<T>`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use std::collections::BTreeSet;
-    ///
-    /// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
-    /// let b: BTreeSet<int> = vec![3,4,5].into_iter().collect();
-    ///
-    /// let result: BTreeSet<int> = a | b;
-    /// let result_vec: Vec<int> = result.into_iter().collect();
-    /// assert_eq!(result_vec, vec![1,2,3,4,5]);
-    /// ```
-    fn bitor(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
-        self.union(rhs).cloned().collect()
-    }
-}
-
-#[unstable = "matches collection reform specification, waiting for dust to settle"]
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl<'a, 'b, T: Ord + Clone> BitOr<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeSet<T> {
     /// Returns the union of `self` and `rhs` as a new `BTreeSet<T>`.
     ///
diff --git a/src/libcollections/enum_set.rs b/src/libcollections/enum_set.rs
index ed7516fec16..bb762f4fb4e 100644
--- a/src/libcollections/enum_set.rs
+++ b/src/libcollections/enum_set.rs
@@ -183,60 +183,24 @@ impl<E:CLike> EnumSet<E> {
     }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl<E:CLike> Sub<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
-    fn sub(&self, e: &EnumSet<E>) -> EnumSet<E> {
-        EnumSet {bits: self.bits & !e.bits}
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl<E:CLike> Sub<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
     fn sub(self, e: EnumSet<E>) -> EnumSet<E> {
         EnumSet {bits: self.bits & !e.bits}
     }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl<E:CLike> BitOr<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
-    fn bitor(&self, e: &EnumSet<E>) -> EnumSet<E> {
-        EnumSet {bits: self.bits | e.bits}
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl<E:CLike> BitOr<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
     fn bitor(self, e: EnumSet<E>) -> EnumSet<E> {
         EnumSet {bits: self.bits | e.bits}
     }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl<E:CLike> BitAnd<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
-    fn bitand(&self, e: &EnumSet<E>) -> EnumSet<E> {
-        EnumSet {bits: self.bits & e.bits}
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl<E:CLike> BitAnd<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
     fn bitand(self, e: EnumSet<E>) -> EnumSet<E> {
         EnumSet {bits: self.bits & e.bits}
     }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl<E:CLike> BitXor<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
-    fn bitxor(&self, e: &EnumSet<E>) -> EnumSet<E> {
-        EnumSet {bits: self.bits ^ e.bits}
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl<E:CLike> BitXor<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
     fn bitxor(self, e: EnumSet<E>) -> EnumSet<E> {
         EnumSet {bits: self.bits ^ e.bits}
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs
index 76f69dbdb74..db59424cedd 100644
--- a/src/libcollections/string.rs
+++ b/src/libcollections/string.rs
@@ -862,28 +862,7 @@ impl<'a, S: Str> Equiv<S> for String {
     }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
 #[experimental = "waiting on Add stabilization"]
-impl<S: Str> Add<S, String> for String {
-    /// Concatenates `self` and `other` as a new mutable `String`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// let string1 = "foo".to_string();
-    /// let string2 = "bar".to_string();
-    /// let string3 = string1 + string2;
-    /// assert_eq!(string3, "foobar".to_string());
-    /// ```
-    fn add(&self, other: &S) -> String {
-        let mut s = String::from_str(self.as_slice());
-        s.push_str(other.as_slice());
-        return s;
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl<'a> Add<&'a str, String> for String {
     fn add(mut self, other: &str) -> String {
         self.push_str(other);
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index 73464c1b2fc..ec2a7c7a06c 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -1361,20 +1361,6 @@ impl<T> AsSlice<T> for Vec<T> {
     }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl<T: Clone, Sized? V: AsSlice<T>> Add<V, Vec<T>> for Vec<T> {
-    #[inline]
-    fn add(&self, rhs: &V) -> Vec<T> {
-        let mut res = Vec::with_capacity(self.len() + rhs.as_slice().len());
-        res.push_all(self.as_slice());
-        res.push_all(rhs.as_slice());
-        res
-    }
-}
-
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove impl after a snapshot
 impl<'a, T: Clone> Add<&'a [T], Vec<T>> for Vec<T> {
     #[inline]
     fn add(mut self, rhs: &[T]) -> Vec<T> {