diff options
30 files changed, 25 insertions, 547 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 87106041c69..b3c2638f3ae 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -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; -} diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index fb73521af56..f361c36ec8f 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -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) } } @@ -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) } } diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs index 2a701e67c53..6196d94b5a6 100644 --- a/src/libcollections/binary_heap.rs +++ b/src/libcollections/binary_heap.rs @@ -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; @@ -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; diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs index df1a3416602..0b762788b20 100644 --- a/src/libcollections/bit.rs +++ b/src/libcollections/bit.rs @@ -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; @@ -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; diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index a0c1c2d1854..747211e9238 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -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); @@ -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); @@ -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); diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs index 8ac1b97de25..7ef887b70cc 100644 --- a/src/libcollections/btree/set.rs +++ b/src/libcollections/btree/set.rs @@ -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; @@ -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; diff --git a/src/libcollections/dlist.rs b/src/libcollections/dlist.rs index c2ffccc88a2..eb1bf93c0aa 100644 --- a/src/libcollections/dlist.rs +++ b/src/libcollections/dlist.rs @@ -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; @@ -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; @@ -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>; diff --git a/src/libcollections/enum_set.rs b/src/libcollections/enum_set.rs index ec30933bd2e..d5403ca5d9b 100644 --- a/src/libcollections/enum_set.rs +++ b/src/libcollections/enum_set.rs @@ -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; diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index 8325e7247d5..cacbf3bce80 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -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 } diff --git a/src/libcollections/ring_buf.rs b/src/libcollections/ring_buf.rs index 93218aed366..6dcdb21f800 100644 --- a/src/libcollections/ring_buf.rs +++ b/src/libcollections/ring_buf.rs @@ -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; @@ -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; @@ -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; diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 245711f6705..bde733644b5 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -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; @@ -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; @@ -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; diff --git a/src/libcollections/vec_map.rs b/src/libcollections/vec_map.rs index 7a2194f8110..82ccfd0614f 100644 --- a/src/libcollections/vec_map.rs +++ b/src/libcollections/vec_map.rs @@ -668,17 +668,6 @@ impl<V> FromIterator<(usize, V)> for VecMap<V> { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<T> IntoIterator for VecMap<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 VecMap<T> { type Item = (usize, T); @@ -689,17 +678,6 @@ impl<T> IntoIterator for VecMap<T> { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a VecMap<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 VecMap<T> { type Item = (usize, &'a T); @@ -710,17 +688,6 @@ impl<'a, T> IntoIterator for &'a VecMap<T> { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a mut VecMap<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 VecMap<T> { type Item = (usize, &'a mut T); diff --git a/src/libcore/array.rs b/src/libcore/array.rs index 886893e647e..838ca4e478b 100644 --- a/src/libcore/array.rs +++ b/src/libcore/array.rs @@ -48,17 +48,6 @@ macro_rules! array_impls { } } - // NOTE(stage0): remove impl after a snapshot - #[cfg(stage0)] - impl<'a, T> IntoIterator for &'a [T; $N] { - 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 [T; $N] { type Item = &'a T; @@ -69,17 +58,6 @@ macro_rules! array_impls { } } - // NOTE(stage0): remove impl after a snapshot - #[cfg(stage0)] - impl<'a, T> IntoIterator for &'a mut [T; $N] { - type IntoIter = IterMut<'a, T>; - - fn into_iter(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 [T; $N] { type Item = &'a mut T; diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index c13e8e78210..eb138e6142b 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -649,8 +649,7 @@ impl<'b, T> DerefMut for RefMut<'b, T> { /// /// **NOTE:** `UnsafeCell<T>`'s fields are public to allow static initializers. It is not /// recommended to access its fields directly, `get` should be used instead. -#[cfg_attr(stage0, lang="unsafe")] // NOTE: remove after next snapshot -#[cfg_attr(not(stage0), lang="unsafe_cell")] +#[lang="unsafe_cell"] #[stable(feature = "rust1", since = "1.0.0")] pub struct UnsafeCell<T> { /// Wrapped value diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 2960c310386..fffba1561a3 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -118,18 +118,6 @@ pub trait FromIterator<A> { fn from_iter<T: Iterator<Item=A>>(iterator: T) -> Self; } -// NOTE(stage0): remove trait after a snapshot -#[cfg(stage0)] -/// Conversion into an `Iterator` -pub trait IntoIterator { - type IntoIter: Iterator; - - /// Consumes `Self` and returns an iterator over it - #[stable(feature = "rust1", since = "1.0.0")] - fn into_iter(self) -> Self::IntoIter; -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot /// Conversion into an `Iterator` #[stable(feature = "rust1", since = "1.0.0")] pub trait IntoIterator { @@ -144,17 +132,6 @@ pub trait IntoIterator { fn into_iter(self) -> Self::IntoIter; } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<I> IntoIterator for I where I: Iterator { - type IntoIter = I; - - fn into_iter(self) -> I { - self - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable(feature = "rust1", since = "1.0.0")] impl<I: Iterator> IntoIterator for I { type Item = I::Item; diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index f1808bc1fb5..f0c60ffe4bf 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -154,25 +154,16 @@ mod array; mod core { pub use panicking; pub use fmt; - #[cfg(not(stage0))] pub use clone; - #[cfg(not(stage0))] pub use cmp; - #[cfg(not(stage0))] pub use hash; - #[cfg(not(stage0))] pub use marker; - #[cfg(not(stage0))] pub use option; - #[cfg(not(stage0))] pub use iter; + pub use clone; + pub use cmp; + pub use hash; + pub use marker; + pub use option; + pub use iter; } #[doc(hidden)] mod std { - // NOTE: remove after next snapshot - #[cfg(stage0)] pub use clone; - #[cfg(stage0)] pub use cmp; - #[cfg(stage0)] pub use hash; - #[cfg(stage0)] pub use marker; - #[cfg(stage0)] pub use option; - #[cfg(stage0)] pub use fmt; - #[cfg(stage0)] pub use iter; - // range syntax pub use ops; } diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 7e8472b91dc..56e1c5dedc1 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -32,7 +32,7 @@ use clone::Clone; reason = "will be overhauled with new lifetime rules; see RFC 458")] #[lang="send"] #[rustc_on_unimplemented = "`{Self}` cannot be sent between threads safely"] -#[cfg(stage0)] // SNAP ac134f7 remove after stage0 +#[cfg(stage0)] pub unsafe trait Send: 'static { // empty. } @@ -435,7 +435,7 @@ pub struct NoCopy; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord)] pub struct Managed; -#[cfg(not(stage0))] // SNAP ac134f7 remove this attribute after the next snapshot +#[cfg(not(stage0))] mod impls { use super::{Send, Sync, Sized}; diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index ded76f51b07..bbfe7e58ef4 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -626,17 +626,6 @@ impl<'a, T> Default for &'a [T] { // Iterators // -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a [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 [T] { type Item = &'a T; @@ -647,17 +636,6 @@ impl<'a, T> IntoIterator for &'a [T] { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a mut [T] { - type IntoIter = IterMut<'a, T>; - - fn into_iter(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 [T] { type Item = &'a mut T; diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 4535e0b1691..d9f420bdd33 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -5733,10 +5733,3 @@ pub mod funcs { pub fn issue_14344_workaround() {} // FIXME #14344 force linkage to happen correctly #[test] fn work_on_windows() { } // FIXME #10872 needed for a happy windows - -// NOTE: remove after next snapshot -#[doc(hidden)] -#[cfg(all(stage0, not(test)))] -mod std { - pub use core::marker; -} diff --git a/src/librand/lib.rs b/src/librand/lib.rs index 4113718cfd1..915c70bbf8c 100644 --- a/src/librand/lib.rs +++ b/src/librand/lib.rs @@ -497,17 +497,6 @@ pub struct Open01<F>(pub F); /// ``` pub struct Closed01<F>(pub F); -// NOTE: remove after next snapshot -#[cfg(all(stage0, not(test)))] -mod std { - pub use core::{option, fmt}; // panic!() - pub use core::clone; // derive Clone - pub use core::marker; - // for-loops - pub use core::iter; - pub use core::ops; // slicing syntax -} - #[cfg(test)] mod test { use std::rand; diff --git a/src/librustc/middle/subst.rs b/src/librustc/middle/subst.rs index e27e7a80246..9bf35bd4284 100644 --- a/src/librustc/middle/subst.rs +++ b/src/librustc/middle/subst.rs @@ -530,17 +530,6 @@ impl<'a,T> Iterator for EnumeratedItems<'a,T> { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<T> IntoIterator for VecPerParamSpace<T> { - type IntoIter = IntoIter<T>; - - fn into_iter(self) -> IntoIter<T> { - self.into_vec().into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot impl<T> IntoIterator for VecPerParamSpace<T> { type Item = T; type IntoIter = IntoIter<T>; @@ -550,17 +539,6 @@ impl<T> IntoIterator for VecPerParamSpace<T> { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a,T> IntoIterator for &'a VecPerParamSpace<T> { - type IntoIter = Iter<'a, T>; - - fn into_iter(self) -> Iter<'a, T> { - self.as_slice().into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot impl<'a,T> IntoIterator for &'a VecPerParamSpace<T> { type Item = &'a T; type IntoIter = Iter<'a, T>; diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 107715a8261..8618bde95fe 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -73,8 +73,6 @@ use std::cell::{Cell, RefCell}; use std::cmp; use std::fmt; use std::hash::{Hash, Writer, SipHasher, Hasher}; -#[cfg(stage0)] -use std::marker; use std::mem; use std::ops; use std::rc::Rc; @@ -944,26 +942,6 @@ pub struct TyS<'tcx> { // the maximal depth of any bound regions appearing in this type. region_depth: u32, - - // force the lifetime to be invariant to work-around - // region-inference issues with a covariant lifetime. - #[cfg(stage0)] - marker: ShowInvariantLifetime<'tcx>, -} - -#[cfg(stage0)] -struct ShowInvariantLifetime<'a>(marker::InvariantLifetime<'a>); -#[cfg(stage0)] -impl<'a> ShowInvariantLifetime<'a> { - fn new() -> ShowInvariantLifetime<'a> { - ShowInvariantLifetime(marker::InvariantLifetime) - } -} -#[cfg(stage0)] -impl<'a> fmt::Debug for ShowInvariantLifetime<'a> { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "InvariantLifetime") - } } impl fmt::Debug for TypeFlags { @@ -972,14 +950,6 @@ impl fmt::Debug for TypeFlags { } } -#[cfg(stage0)] -impl<'tcx> PartialEq for TyS<'tcx> { - fn eq<'a,'b>(&'a self, other: &'b TyS<'tcx>) -> bool { - let other: &'a TyS<'tcx> = unsafe { mem::transmute(other) }; - (self as *const _) == (other as *const _) - } -} -#[cfg(not(stage0))] impl<'tcx> PartialEq for TyS<'tcx> { fn eq(&self, other: &TyS<'tcx>) -> bool { // (self as *const _) == (other as *const _) @@ -2562,12 +2532,6 @@ fn intern_ty<'tcx>(type_arena: &'tcx TypedArena<TyS<'tcx>>, let flags = FlagComputation::for_sty(&st); let ty = match () { - #[cfg(stage0)] - () => type_arena.alloc(TyS { sty: st, - flags: flags.flags, - region_depth: flags.depth, - marker: ShowInvariantLifetime::new(), }), - #[cfg(not(stage0))] () => type_arena.alloc(TyS { sty: st, flags: flags.flags, region_depth: flags.depth, }), diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index e11bcec150c..1b9f8b99017 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1372,21 +1372,6 @@ enum VacantEntryState<K, V, M> { NoElem(EmptyBucket<K, V, M>), } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, K, V, S, H> IntoIterator for &'a HashMap<K, V, S> - where K: Eq + Hash<H>, - S: HashState<Hasher=H>, - H: hash::Hasher<Output=u64> -{ - 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, S, H> IntoIterator for &'a HashMap<K, V, S> where K: Eq + Hash<H>, @@ -1401,21 +1386,6 @@ impl<'a, K, V, S, H> IntoIterator for &'a HashMap<K, V, S> } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, K, V, S, H> IntoIterator for &'a mut HashMap<K, V, S> - where K: Eq + Hash<H>, - S: HashState<Hasher=H>, - H: hash::Hasher<Output=u64> -{ - 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, S, H> IntoIterator for &'a mut HashMap<K, V, S> where K: Eq + Hash<H>, @@ -1430,21 +1400,6 @@ impl<'a, K, V, S, H> IntoIterator for &'a mut HashMap<K, V, S> } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<K, V, S, H> IntoIterator for HashMap<K, V, S> - where K: Eq + Hash<H>, - S: HashState<Hasher=H>, - H: hash::Hasher<Output=u64> -{ - 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, S, H> IntoIterator for HashMap<K, V, S> where K: Eq + Hash<H>, diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index fb01dc89e68..5fbbcb3b347 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -835,21 +835,6 @@ pub struct Union<'a, T: 'a, S: 'a> { iter: Chain<Iter<'a, T>, Difference<'a, T, S>> } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T, S, H> IntoIterator for &'a HashSet<T, S> - where T: Eq + Hash<H>, - S: HashState<Hasher=H>, - H: hash::Hasher<Output=u64> -{ - 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, S, H> IntoIterator for &'a HashSet<T, S> where T: Eq + Hash<H>, @@ -864,21 +849,6 @@ impl<'a, T, S, H> IntoIterator for &'a HashSet<T, S> } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<T, S, H> IntoIterator for HashSet<T, S> - where T: Eq + Hash<H>, - S: HashState<Hasher=H>, - H: hash::Hasher<Output=u64> -{ - 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, S, H> IntoIterator for HashSet<T, S> where T: Eq + Hash<H>, diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 139693ccdbc..7c9a8a7b4b5 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -292,13 +292,6 @@ mod tuple; // can be resolved within libstd. #[doc(hidden)] mod std { - // NOTE: remove after next snapshot - // mods used for deriving - #[cfg(stage0)] pub use clone; - #[cfg(stage0)] pub use cmp; - #[cfg(stage0)] pub use hash; - #[cfg(stage0)] pub use default; - pub use sync; // used for select!() pub use error; // used for try!() pub use fmt; // used for any formatting strings @@ -319,7 +312,4 @@ mod std { pub use slice; pub use boxed; // used for vec![] - // for-loops - // NOTE: remove after next snapshot - #[cfg(stage0)] pub use iter; } diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 1b9b13d4bd4..00bb7f86b17 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -60,23 +60,6 @@ macro_rules! panic { }); } -/// Use the syntax described in `std::fmt` to create a value of type `String`. -/// See `std::fmt` for more information. -/// -/// # Example -/// -/// ``` -/// format!("test"); -/// format!("hello {}", "world!"); -/// format!("x = {}, y = {y}", 10, y = 30); -/// ``` -#[cfg(stage0)] // NOTE: remove after snapshot -#[macro_export] -#[stable(feature = "rust1", since = "1.0.0")] -macro_rules! format { - ($($arg:tt)*) => ($crate::fmt::format(format_args!($($arg)*))) -} - /// Equivalent to the `println!` macro except that a newline is not printed at /// the end of the message. #[macro_export] diff --git a/src/libstd/thunk.rs b/src/libstd/thunk.rs index 1412dbd70b9..fe39954f0d4 100644 --- a/src/libstd/thunk.rs +++ b/src/libstd/thunk.rs @@ -17,7 +17,7 @@ use core::marker::Send; use core::ops::FnOnce; pub struct Thunk<'a, A=(),R=()> { - #[cfg(stage0)] // // SNAP ac134f7 remove after stage0 + #[cfg(stage0)] invoke: Box<Invoke<A,R>+Send>, #[cfg(not(stage0))] invoke: Box<Invoke<A,R>+Send + 'a>, diff --git a/src/libunicode/lib.rs b/src/libunicode/lib.rs index 89b310d4949..791886be1ce 100644 --- a/src/libunicode/lib.rs +++ b/src/libunicode/lib.rs @@ -77,16 +77,3 @@ pub mod str { pub use u_str::{utf8_char_width, is_utf16, Utf16Items, Utf16Item}; pub use u_str::{utf16_items, Utf16Encoder}; } - -// NOTE: remove after next snapshot -// this lets us use #[derive(..)] -#[cfg(stage0)] -mod std { - pub use core::clone; - pub use core::cmp; - pub use core::fmt; - pub use core::marker; - // for-loops - pub use core::iter; - pub use core::option; -} diff --git a/src/snapshots.txt b/src/snapshots.txt index 56948ea1219..4759c44259d 100644 --- a/src/snapshots.txt +++ b/src/snapshots.txt @@ -1,3 +1,12 @@ +S 2015-02-17 f1bb6c2 + freebsd-x86_64 59f3a2c6350c170804fb65838e1b504eeab89105 + linux-i386 191ed5ec4f17e32d36abeade55a1c6085e51245c + linux-x86_64 acec86045632f4f3f085c072ba696f889906dffe + macos-i386 9d9e622584bfa318f32bcb5b9ce6a365febff595 + macos-x86_64 e96c1e9860b186507cc75c186d1b96d44df12292 + winnt-i386 3f43e0e71311636f9143ad6f2ee7a514e9fa3f8e + winnt-x86_64 26ef3d9098ea346e5ff8945d5b224bb10c24341d + S 2015-02-04 ac134f7 freebsd-x86_64 483e37a02a7ebc12a872e3146145e342ba4a5c04 linux-i386 8af64e5df839cc945399484380a8b2ebe05a6751 diff --git a/src/test/run-pass/foreign-call-no-runtime.rs b/src/test/run-pass/foreign-call-no-runtime.rs index f99d3eb1c7d..3f226a1985e 100644 --- a/src/test/run-pass/foreign-call-no-runtime.rs +++ b/src/test/run-pass/foreign-call-no-runtime.rs @@ -11,7 +11,7 @@ extern crate libc; use std::mem; -use std::thread::Thread; +use std::thread; #[link(name = "rust_test_helpers")] extern { @@ -21,9 +21,9 @@ extern { pub fn main() { unsafe { - Thread::scoped(move|| { - let i = &100; - rust_dbg_call(callback, mem::transmute(i)); + thread::spawn(move|| { + let i = 100; + rust_dbg_call(callback, mem::transmute(&i)); }).join(); } } |
