Skip to content

Commit

Permalink
Register new snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Feb 18, 2015
1 parent 665ea96 commit 47f91a9
Show file tree
Hide file tree
Showing 30 changed files with 25 additions and 547 deletions.
8 changes: 0 additions & 8 deletions src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,3 @@ pub fn oom() -> ! {
// optimize it out).
#[doc(hidden)]
pub fn fixme_14344_be_sure_to_link_to_collections() {}

// NOTE: remove after next snapshot
#[cfg(all(stage0, not(test)))]
#[doc(hidden)]
mod std {
pub use core::fmt;
pub use core::option;
}
8 changes: 2 additions & 6 deletions src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,9 +776,7 @@ impl<T> RcBoxPtr<T> for Rc<T> {
// the contract anyway.
// This allows the null check to be elided in the destructor if we
// manipulated the reference count in the same function.
if cfg!(not(stage0)) { // NOTE remove cfg after next snapshot
assume(!self._ptr.is_null());
}
assume(!self._ptr.is_null());
&(**self._ptr)
}
}
Expand All @@ -792,9 +790,7 @@ impl<T> RcBoxPtr<T> for Weak<T> {
// the contract anyway.
// This allows the null check to be elided in the destructor if we
// manipulated the reference count in the same function.
if cfg!(not(stage0)) { // NOTE remove cfg after next snapshot
assume(!self._ptr.is_null());
}
assume(!self._ptr.is_null());
&(**self._ptr)
}
}
Expand Down
22 changes: 0 additions & 22 deletions src/libcollections/binary_heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,17 +655,6 @@ impl<T: Ord> FromIterator<T> for BinaryHeap<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<T: Ord> IntoIterator for BinaryHeap<T> {
type IntoIter = IntoIter<T>;

fn into_iter(self) -> IntoIter<T> {
self.into_iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Ord> IntoIterator for BinaryHeap<T> {
type Item = T;
Expand All @@ -676,17 +665,6 @@ impl<T: Ord> IntoIterator for BinaryHeap<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, T> IntoIterator for &'a BinaryHeap<T> where T: Ord {
type IntoIter = Iter<'a, T>;

fn into_iter(self) -> Iter<'a, T> {
self.iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> IntoIterator for &'a BinaryHeap<T> where T: Ord {
type Item = &'a T;
Expand Down
22 changes: 0 additions & 22 deletions src/libcollections/bit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1070,17 +1070,6 @@ impl<'a> RandomAccessIterator for Iter<'a> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a> IntoIterator for &'a Bitv {
type IntoIter = Iter<'a>;

fn into_iter(self) -> Iter<'a> {
self.iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a> IntoIterator for &'a Bitv {
type Item = bool;
Expand Down Expand Up @@ -1895,17 +1884,6 @@ impl<'a> Iterator for SymmetricDifference<'a> {
#[inline] fn size_hint(&self) -> (usize, Option<usize>) { self.0.size_hint() }
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a> IntoIterator for &'a BitvSet {
type IntoIter = SetIter<'a>;

fn into_iter(self) -> SetIter<'a> {
self.iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a> IntoIterator for &'a BitvSet {
type Item = usize;
Expand Down
33 changes: 0 additions & 33 deletions src/libcollections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,17 +462,6 @@ impl<K: Ord, V> BTreeMap<K, V> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<K, V> IntoIterator for BTreeMap<K, V> {
type IntoIter = IntoIter<K, V>;

fn into_iter(self) -> IntoIter<K, V> {
self.into_iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<K, V> IntoIterator for BTreeMap<K, V> {
type Item = (K, V);
Expand All @@ -483,17 +472,6 @@ impl<K, V> IntoIterator for BTreeMap<K, V> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, K, V> IntoIterator for &'a BTreeMap<K, V> {
type IntoIter = Iter<'a, K, V>;

fn into_iter(self) -> Iter<'a, K, V> {
self.iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, K, V> IntoIterator for &'a BTreeMap<K, V> {
type Item = (&'a K, &'a V);
Expand All @@ -504,17 +482,6 @@ impl<'a, K, V> IntoIterator for &'a BTreeMap<K, V> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, K, V> IntoIterator for &'a mut BTreeMap<K, V> {
type IntoIter = IterMut<'a, K, V>;

fn into_iter(mut self) -> IterMut<'a, K, V> {
self.iter_mut()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, K, V> IntoIterator for &'a mut BTreeMap<K, V> {
type Item = (&'a K, &'a mut V);
Expand Down
22 changes: 0 additions & 22 deletions src/libcollections/btree/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,17 +480,6 @@ impl<T: Ord> FromIterator<T> for BTreeSet<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<T> IntoIterator for BTreeSet<T> {
type IntoIter = IntoIter<T>;

fn into_iter(self) -> IntoIter<T> {
self.into_iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> IntoIterator for BTreeSet<T> {
type Item = T;
Expand All @@ -501,17 +490,6 @@ impl<T> IntoIterator for BTreeSet<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, T> IntoIterator for &'a BTreeSet<T> {
type IntoIter = Iter<'a, T>;

fn into_iter(self) -> Iter<'a, T> {
self.iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> IntoIterator for &'a BTreeSet<T> {
type Item = &'a T;
Expand Down
33 changes: 0 additions & 33 deletions src/libcollections/dlist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,17 +837,6 @@ impl<A> FromIterator<A> for DList<A> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<T> IntoIterator for DList<T> {
type IntoIter = IntoIter<T>;

fn into_iter(self) -> IntoIter<T> {
self.into_iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> IntoIterator for DList<T> {
type Item = T;
Expand All @@ -858,17 +847,6 @@ impl<T> IntoIterator for DList<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, T> IntoIterator for &'a DList<T> {
type IntoIter = Iter<'a, T>;

fn into_iter(self) -> Iter<'a, T> {
self.iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> IntoIterator for &'a DList<T> {
type Item = &'a T;
Expand All @@ -879,17 +857,6 @@ impl<'a, T> IntoIterator for &'a DList<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, T> IntoIterator for &'a mut DList<T> {
type IntoIter = IterMut<'a, T>;

fn into_iter(mut self) -> IterMut<'a, T> {
self.iter_mut()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
impl<'a, T> IntoIterator for &'a mut DList<T> {
type Item = &'a mut T;
type IntoIter = IterMut<'a, T>;
Expand Down
11 changes: 0 additions & 11 deletions src/libcollections/enum_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,17 +257,6 @@ 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>;

fn into_iter(self) -> Iter<E> {
self.iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, E> IntoIterator for &'a EnumSet<E> where E: CLike {
type Item = E;
Expand Down
9 changes: 0 additions & 9 deletions src/libcollections/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,6 @@ pub fn fixme_14344_be_sure_to_link_to_collections() {}

#[cfg(not(test))]
mod std {
// NOTE: remove after next snapshot
#[cfg(stage0)] pub use core::clone; // derive(Clone)
#[cfg(stage0)] pub use core::cmp; // derive(Eq, Ord, etc.)
#[cfg(stage0)] pub use core::marker; // derive(Copy)
#[cfg(stage0)] pub use core::hash; // derive(Hash)
#[cfg(stage0)] pub use core::iter;
#[cfg(stage0)] pub use core::fmt; // necessary for panic!()
#[cfg(stage0)] pub use core::option; // necessary for panic!()

pub use core::ops; // RangeFull
}

Expand Down
33 changes: 0 additions & 33 deletions src/libcollections/ring_buf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1704,17 +1704,6 @@ impl<A> FromIterator<A> for RingBuf<A> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<T> IntoIterator for RingBuf<T> {
type IntoIter = IntoIter<T>;

fn into_iter(self) -> IntoIter<T> {
self.into_iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> IntoIterator for RingBuf<T> {
type Item = T;
Expand All @@ -1725,17 +1714,6 @@ impl<T> IntoIterator for RingBuf<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, T> IntoIterator for &'a RingBuf<T> {
type IntoIter = Iter<'a, T>;

fn into_iter(self) -> Iter<'a, T> {
self.iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> IntoIterator for &'a RingBuf<T> {
type Item = &'a T;
Expand All @@ -1746,17 +1724,6 @@ impl<'a, T> IntoIterator for &'a RingBuf<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, T> IntoIterator for &'a mut RingBuf<T> {
type IntoIter = IterMut<'a, T>;

fn into_iter(mut self) -> IterMut<'a, T> {
self.iter_mut()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> IntoIterator for &'a mut RingBuf<T> {
type Item = &'a mut T;
Expand Down
33 changes: 0 additions & 33 deletions src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1447,17 +1447,6 @@ impl<T> FromIterator<T> for Vec<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<T> IntoIterator for Vec<T> {
type IntoIter = IntoIter<T>;

fn into_iter(self) -> IntoIter<T> {
self.into_iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> IntoIterator for Vec<T> {
type Item = T;
Expand All @@ -1468,17 +1457,6 @@ impl<T> IntoIterator for Vec<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, T> IntoIterator for &'a Vec<T> {
type IntoIter = slice::Iter<'a, T>;

fn into_iter(self) -> slice::Iter<'a, T> {
self.iter()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> IntoIterator for &'a Vec<T> {
type Item = &'a T;
Expand All @@ -1489,17 +1467,6 @@ impl<'a, T> IntoIterator for &'a Vec<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, T> IntoIterator for &'a mut Vec<T> {
type IntoIter = slice::IterMut<'a, T>;

fn into_iter(mut self) -> slice::IterMut<'a, T> {
self.iter_mut()
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> IntoIterator for &'a mut Vec<T> {
type Item = &'a mut T;
Expand Down
Loading

0 comments on commit 47f91a9

Please sign in to comment.