Skip to content

Commit 84086c4

Browse files
committed
Register new snapshots
This does not yet start the movement to rustc-serialize. That detail is left to a future PR.
1 parent bd90b93 commit 84086c4

File tree

12 files changed

+9
-835
lines changed

12 files changed

+9
-835
lines changed

src/libcollections/btree/set.rs

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -448,30 +448,6 @@ impl<T: Ord> Default for BTreeSet<T> {
448448
}
449449

450450
#[unstable = "matches collection reform specification, waiting for dust to settle"]
451-
// NOTE(stage0): Remove impl after a snapshot
452-
#[cfg(stage0)]
453-
impl<T: Ord + Clone> Sub<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
454-
/// Returns the difference of `self` and `rhs` as a new `BTreeSet<T>`.
455-
///
456-
/// # Examples
457-
///
458-
/// ```
459-
/// use std::collections::BTreeSet;
460-
///
461-
/// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
462-
/// let b: BTreeSet<int> = vec![3,4,5].into_iter().collect();
463-
///
464-
/// let result: BTreeSet<int> = a - b;
465-
/// let result_vec: Vec<int> = result.into_iter().collect();
466-
/// assert_eq!(result_vec, vec![1,2]);
467-
/// ```
468-
fn sub(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
469-
self.difference(rhs).cloned().collect()
470-
}
471-
}
472-
473-
#[unstable = "matches collection reform specification, waiting for dust to settle"]
474-
#[cfg(not(stage0))] // NOTE(stage0): Remove cfg after a snapshot
475451
impl<'a, 'b, T: Ord + Clone> Sub<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeSet<T> {
476452
/// Returns the difference of `self` and `rhs` as a new `BTreeSet<T>`.
477453
///
@@ -493,30 +469,6 @@ impl<'a, 'b, T: Ord + Clone> Sub<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeSet<
493469
}
494470

495471
#[unstable = "matches collection reform specification, waiting for dust to settle"]
496-
// NOTE(stage0): Remove impl after a snapshot
497-
#[cfg(stage0)]
498-
impl<T: Ord + Clone> BitXor<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
499-
/// Returns the symmetric difference of `self` and `rhs` as a new `BTreeSet<T>`.
500-
///
501-
/// # Examples
502-
///
503-
/// ```
504-
/// use std::collections::BTreeSet;
505-
///
506-
/// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
507-
/// let b: BTreeSet<int> = vec![2,3,4].into_iter().collect();
508-
///
509-
/// let result: BTreeSet<int> = a ^ b;
510-
/// let result_vec: Vec<int> = result.into_iter().collect();
511-
/// assert_eq!(result_vec, vec![1,4]);
512-
/// ```
513-
fn bitxor(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
514-
self.symmetric_difference(rhs).cloned().collect()
515-
}
516-
}
517-
518-
#[unstable = "matches collection reform specification, waiting for dust to settle"]
519-
#[cfg(not(stage0))] // NOTE(stage0): Remove cfg after a snapshot
520472
impl<'a, 'b, T: Ord + Clone> BitXor<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeSet<T> {
521473
/// Returns the symmetric difference of `self` and `rhs` as a new `BTreeSet<T>`.
522474
///
@@ -538,30 +490,6 @@ impl<'a, 'b, T: Ord + Clone> BitXor<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeS
538490
}
539491

540492
#[unstable = "matches collection reform specification, waiting for dust to settle"]
541-
// NOTE(stage0): Remove impl after a snapshot
542-
#[cfg(stage0)]
543-
impl<T: Ord + Clone> BitAnd<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
544-
/// Returns the intersection of `self` and `rhs` as a new `BTreeSet<T>`.
545-
///
546-
/// # Examples
547-
///
548-
/// ```
549-
/// use std::collections::BTreeSet;
550-
///
551-
/// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
552-
/// let b: BTreeSet<int> = vec![2,3,4].into_iter().collect();
553-
///
554-
/// let result: BTreeSet<int> = a & b;
555-
/// let result_vec: Vec<int> = result.into_iter().collect();
556-
/// assert_eq!(result_vec, vec![2,3]);
557-
/// ```
558-
fn bitand(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
559-
self.intersection(rhs).cloned().collect()
560-
}
561-
}
562-
563-
#[unstable = "matches collection reform specification, waiting for dust to settle"]
564-
#[cfg(not(stage0))] // NOTE(stage0): Remove cfg after a snapshot
565493
impl<'a, 'b, T: Ord + Clone> BitAnd<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeSet<T> {
566494
/// Returns the intersection of `self` and `rhs` as a new `BTreeSet<T>`.
567495
///
@@ -583,30 +511,6 @@ impl<'a, 'b, T: Ord + Clone> BitAnd<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeS
583511
}
584512

585513
#[unstable = "matches collection reform specification, waiting for dust to settle"]
586-
// NOTE(stage0): Remove impl after a snapshot
587-
#[cfg(stage0)]
588-
impl<T: Ord + Clone> BitOr<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
589-
/// Returns the union of `self` and `rhs` as a new `BTreeSet<T>`.
590-
///
591-
/// # Examples
592-
///
593-
/// ```
594-
/// use std::collections::BTreeSet;
595-
///
596-
/// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
597-
/// let b: BTreeSet<int> = vec![3,4,5].into_iter().collect();
598-
///
599-
/// let result: BTreeSet<int> = a | b;
600-
/// let result_vec: Vec<int> = result.into_iter().collect();
601-
/// assert_eq!(result_vec, vec![1,2,3,4,5]);
602-
/// ```
603-
fn bitor(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
604-
self.union(rhs).cloned().collect()
605-
}
606-
}
607-
608-
#[unstable = "matches collection reform specification, waiting for dust to settle"]
609-
#[cfg(not(stage0))] // NOTE(stage0): Remove cfg after a snapshot
610514
impl<'a, 'b, T: Ord + Clone> BitOr<&'b BTreeSet<T>, BTreeSet<T>> for &'a BTreeSet<T> {
611515
/// Returns the union of `self` and `rhs` as a new `BTreeSet<T>`.
612516
///

src/libcollections/enum_set.rs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -183,60 +183,24 @@ impl<E:CLike> EnumSet<E> {
183183
}
184184
}
185185

186-
// NOTE(stage0): Remove impl after a snapshot
187-
#[cfg(stage0)]
188-
impl<E:CLike> Sub<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
189-
fn sub(&self, e: &EnumSet<E>) -> EnumSet<E> {
190-
EnumSet {bits: self.bits & !e.bits}
191-
}
192-
}
193-
194-
#[cfg(not(stage0))] // NOTE(stage0): Remove cfg after a snapshot
195186
impl<E:CLike> Sub<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
196187
fn sub(self, e: EnumSet<E>) -> EnumSet<E> {
197188
EnumSet {bits: self.bits & !e.bits}
198189
}
199190
}
200191

201-
// NOTE(stage0): Remove impl after a snapshot
202-
#[cfg(stage0)]
203-
impl<E:CLike> BitOr<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
204-
fn bitor(&self, e: &EnumSet<E>) -> EnumSet<E> {
205-
EnumSet {bits: self.bits | e.bits}
206-
}
207-
}
208-
209-
#[cfg(not(stage0))] // NOTE(stage0): Remove cfg after a snapshot
210192
impl<E:CLike> BitOr<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
211193
fn bitor(self, e: EnumSet<E>) -> EnumSet<E> {
212194
EnumSet {bits: self.bits | e.bits}
213195
}
214196
}
215197

216-
// NOTE(stage0): Remove impl after a snapshot
217-
#[cfg(stage0)]
218-
impl<E:CLike> BitAnd<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
219-
fn bitand(&self, e: &EnumSet<E>) -> EnumSet<E> {
220-
EnumSet {bits: self.bits & e.bits}
221-
}
222-
}
223-
224-
#[cfg(not(stage0))] // NOTE(stage0): Remove cfg after a snapshot
225198
impl<E:CLike> BitAnd<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
226199
fn bitand(self, e: EnumSet<E>) -> EnumSet<E> {
227200
EnumSet {bits: self.bits & e.bits}
228201
}
229202
}
230203

231-
// NOTE(stage0): Remove impl after a snapshot
232-
#[cfg(stage0)]
233-
impl<E:CLike> BitXor<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
234-
fn bitxor(&self, e: &EnumSet<E>) -> EnumSet<E> {
235-
EnumSet {bits: self.bits ^ e.bits}
236-
}
237-
}
238-
239-
#[cfg(not(stage0))] // NOTE(stage0): Remove cfg after a snapshot
240204
impl<E:CLike> BitXor<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
241205
fn bitxor(self, e: EnumSet<E>) -> EnumSet<E> {
242206
EnumSet {bits: self.bits ^ e.bits}

src/libcollections/string.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -856,36 +856,14 @@ impl<'a, S: Str> Equiv<S> for String {
856856
}
857857
}
858858

859-
// NOTE(stage0): Remove impl after a snapshot
860-
#[cfg(stage0)]
861859
#[experimental = "waiting on Add stabilization"]
862-
impl<S: Str> Add<S, String> for String {
863-
/// Concatenates `self` and `other` as a new mutable `String`.
864-
///
865-
/// # Examples
866-
///
867-
/// ```
868-
/// let string1 = "foo".to_string();
869-
/// let string2 = "bar".to_string();
870-
/// let string3 = string1 + string2;
871-
/// assert_eq!(string3, "foobar".to_string());
872-
/// ```
873-
fn add(&self, other: &S) -> String {
874-
let mut s = String::from_str(self.as_slice());
875-
s.push_str(other.as_slice());
876-
return s;
877-
}
878-
}
879-
880-
#[cfg(not(stage0))] // NOTE(stage0): Remove cfg after a snapshot
881860
impl<'a> Add<&'a str, String> for String {
882861
fn add(mut self, other: &str) -> String {
883862
self.push_str(other);
884863
self
885864
}
886865
}
887866

888-
#[cfg(not(stage0))] // NOTE(stage0): Remove cfg after a snapshot
889867
impl<'a> Add<String, String> for &'a str {
890868
fn add(self, mut other: String) -> String {
891869
other.push_str(self);

src/libcollections/vec.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,20 +1313,6 @@ impl<T> AsSlice<T> for Vec<T> {
13131313
}
13141314
}
13151315

1316-
// NOTE(stage0): Remove impl after a snapshot
1317-
#[cfg(stage0)]
1318-
impl<T: Clone, Sized? V: AsSlice<T>> Add<V, Vec<T>> for Vec<T> {
1319-
#[inline]
1320-
fn add(&self, rhs: &V) -> Vec<T> {
1321-
let mut res = Vec::with_capacity(self.len() + rhs.as_slice().len());
1322-
res.push_all(self.as_slice());
1323-
res.push_all(rhs.as_slice());
1324-
res
1325-
}
1326-
}
1327-
1328-
1329-
#[cfg(not(stage0))] // NOTE(stage0): Remove impl after a snapshot
13301316
impl<'a, T: Clone> Add<&'a [T], Vec<T>> for Vec<T> {
13311317
#[inline]
13321318
fn add(mut self, rhs: &[T]) -> Vec<T> {
@@ -1335,7 +1321,6 @@ impl<'a, T: Clone> Add<&'a [T], Vec<T>> for Vec<T> {
13351321
}
13361322
}
13371323

1338-
#[cfg(not(stage0))] // NOTE(stage0): Remove impl after a snapshot
13391324
impl<'a, T: Clone> Add<Vec<T>, Vec<T>> for &'a [T] {
13401325
#[inline]
13411326
fn add(self, mut rhs: Vec<T>) -> Vec<T> {

0 commit comments

Comments
 (0)