diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 87106041c69d..b3c2638f3ae2 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 fb73521af565..f361c36ec8fa 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -776,9 +776,7 @@ impl RcBoxPtr for Rc { // 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 RcBoxPtr for Weak { // 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 2a701e67c53e..6196d94b5a6b 100644 --- a/src/libcollections/binary_heap.rs +++ b/src/libcollections/binary_heap.rs @@ -655,17 +655,6 @@ impl FromIterator for BinaryHeap { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl IntoIterator for BinaryHeap { - type IntoIter = IntoIter; - - fn into_iter(self) -> IntoIter { - self.into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable(feature = "rust1", since = "1.0.0")] impl IntoIterator for BinaryHeap { type Item = T; @@ -676,17 +665,6 @@ impl IntoIterator for BinaryHeap { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a BinaryHeap 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 where T: Ord { type Item = &'a T; diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs index df1a34166029..0b762788b208 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) { 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 a0c1c2d18547..747211e92385 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -462,17 +462,6 @@ impl BTreeMap { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl IntoIterator for BTreeMap { - type IntoIter = IntoIter; - - fn into_iter(self) -> IntoIter { - self.into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable(feature = "rust1", since = "1.0.0")] impl IntoIterator for BTreeMap { type Item = (K, V); @@ -483,17 +472,6 @@ impl IntoIterator for BTreeMap { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, K, V> IntoIterator for &'a BTreeMap { - 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 { type Item = (&'a K, &'a V); @@ -504,17 +482,6 @@ impl<'a, K, V> IntoIterator for &'a BTreeMap { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, K, V> IntoIterator for &'a mut BTreeMap { - 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 { type Item = (&'a K, &'a mut V); diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs index 8ac1b97de25e..7ef887b70cc6 100644 --- a/src/libcollections/btree/set.rs +++ b/src/libcollections/btree/set.rs @@ -480,17 +480,6 @@ impl FromIterator for BTreeSet { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl IntoIterator for BTreeSet { - type IntoIter = IntoIter; - - fn into_iter(self) -> IntoIter { - self.into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable(feature = "rust1", since = "1.0.0")] impl IntoIterator for BTreeSet { type Item = T; @@ -501,17 +490,6 @@ impl IntoIterator for BTreeSet { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a BTreeSet { - 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 { type Item = &'a T; diff --git a/src/libcollections/dlist.rs b/src/libcollections/dlist.rs index c2ffccc88a2e..eb1bf93c0aaf 100644 --- a/src/libcollections/dlist.rs +++ b/src/libcollections/dlist.rs @@ -837,17 +837,6 @@ impl FromIterator for DList { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl IntoIterator for DList { - type IntoIter = IntoIter; - - fn into_iter(self) -> IntoIter { - self.into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable(feature = "rust1", since = "1.0.0")] impl IntoIterator for DList { type Item = T; @@ -858,17 +847,6 @@ impl IntoIterator for DList { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a DList { - 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 { type Item = &'a T; @@ -879,17 +857,6 @@ impl<'a, T> IntoIterator for &'a DList { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a mut DList { - 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 { 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 ec30933bd2ec..d5403ca5d9b1 100644 --- a/src/libcollections/enum_set.rs +++ b/src/libcollections/enum_set.rs @@ -257,17 +257,6 @@ impl FromIterator for EnumSet { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, E> IntoIterator for &'a EnumSet where E: CLike { - type IntoIter = Iter; - - fn into_iter(self) -> Iter { - 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 where E: CLike { type Item = E; diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index 8325e7247d5f..cacbf3bce80f 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 93218aed3667..6dcdb21f8000 100644 --- a/src/libcollections/ring_buf.rs +++ b/src/libcollections/ring_buf.rs @@ -1704,17 +1704,6 @@ impl FromIterator for RingBuf { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl IntoIterator for RingBuf { - type IntoIter = IntoIter; - - fn into_iter(self) -> IntoIter { - self.into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable(feature = "rust1", since = "1.0.0")] impl IntoIterator for RingBuf { type Item = T; @@ -1725,17 +1714,6 @@ impl IntoIterator for RingBuf { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a RingBuf { - 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 { type Item = &'a T; @@ -1746,17 +1724,6 @@ impl<'a, T> IntoIterator for &'a RingBuf { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a mut RingBuf { - 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 { type Item = &'a mut T; diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 245711f67059..bde733644b5b 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -1447,17 +1447,6 @@ impl FromIterator for Vec { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl IntoIterator for Vec { - type IntoIter = IntoIter; - - fn into_iter(self) -> IntoIter { - self.into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable(feature = "rust1", since = "1.0.0")] impl IntoIterator for Vec { type Item = T; @@ -1468,17 +1457,6 @@ impl IntoIterator for Vec { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a Vec { - 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 { type Item = &'a T; @@ -1489,17 +1467,6 @@ impl<'a, T> IntoIterator for &'a Vec { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a mut Vec { - 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 { type Item = &'a mut T; diff --git a/src/libcollections/vec_map.rs b/src/libcollections/vec_map.rs index 7a2194f81101..82ccfd0614fd 100644 --- a/src/libcollections/vec_map.rs +++ b/src/libcollections/vec_map.rs @@ -668,17 +668,6 @@ impl FromIterator<(usize, V)> for VecMap { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl IntoIterator for VecMap { - type IntoIter = IntoIter; - - fn into_iter(self) -> IntoIter { - self.into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable(feature = "rust1", since = "1.0.0")] impl IntoIterator for VecMap { type Item = (usize, T); @@ -689,17 +678,6 @@ impl IntoIterator for VecMap { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a VecMap { - 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 { type Item = (usize, &'a T); @@ -710,17 +688,6 @@ impl<'a, T> IntoIterator for &'a VecMap { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T> IntoIterator for &'a mut VecMap { - 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 { type Item = (usize, &'a mut T); diff --git a/src/libcore/array.rs b/src/libcore/array.rs index 886893e647e2..838ca4e478b7 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 c13e8e782100..eb138e6142b8 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`'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 { /// Wrapped value diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 2960c3103868..fffba1561a38 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -118,18 +118,6 @@ pub trait FromIterator { fn from_iter>(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 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 IntoIterator for I { type Item = I::Item; diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index f1808bc1fb50..f0c60ffe4bf6 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 7e8472b91dc2..56e1c5dedc1c 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 ded76f51b07d..bbfe7e58ef4a 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 4535e0b16919..d9f420bdd339 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 4113718cfd15..915c70bbf8ce 100644 --- a/src/librand/lib.rs +++ b/src/librand/lib.rs @@ -497,17 +497,6 @@ pub struct Open01(pub F); /// ``` pub struct Closed01(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 e27e7a802468..9bf35bd42847 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 IntoIterator for VecPerParamSpace { - type IntoIter = IntoIter; - - fn into_iter(self) -> IntoIter { - self.into_vec().into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot impl IntoIterator for VecPerParamSpace { type Item = T; type IntoIter = IntoIter; @@ -550,17 +539,6 @@ impl IntoIterator for VecPerParamSpace { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a,T> IntoIterator for &'a VecPerParamSpace { - 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 { type Item = &'a T; type IntoIter = Iter<'a, T>; diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 107715a82615..8618bde95fe6 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>, 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 e11bcec150c8..1b9f8b990172 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1372,21 +1372,6 @@ enum VacantEntryState { NoElem(EmptyBucket), } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, K, V, S, H> IntoIterator for &'a HashMap - where K: Eq + Hash, - S: HashState, - H: hash::Hasher -{ - 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 where K: Eq + Hash, @@ -1401,21 +1386,6 @@ impl<'a, K, V, S, H> IntoIterator for &'a HashMap } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, K, V, S, H> IntoIterator for &'a mut HashMap - where K: Eq + Hash, - S: HashState, - H: hash::Hasher -{ - 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 where K: Eq + Hash, @@ -1430,21 +1400,6 @@ impl<'a, K, V, S, H> IntoIterator for &'a mut HashMap } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl IntoIterator for HashMap - where K: Eq + Hash, - S: HashState, - H: hash::Hasher -{ - type IntoIter = IntoIter; - - fn into_iter(self) -> IntoIter { - self.into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable(feature = "rust1", since = "1.0.0")] impl IntoIterator for HashMap where K: Eq + Hash, diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index fb01dc89e684..5fbbcb3b347a 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, Difference<'a, T, S>> } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a, T, S, H> IntoIterator for &'a HashSet - where T: Eq + Hash, - S: HashState, - H: hash::Hasher -{ - 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 where T: Eq + Hash, @@ -864,21 +849,6 @@ impl<'a, T, S, H> IntoIterator for &'a HashSet } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl IntoIterator for HashSet - where T: Eq + Hash, - S: HashState, - H: hash::Hasher -{ - type IntoIter = IntoIter; - - fn into_iter(self) -> IntoIter { - self.into_iter() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable(feature = "rust1", since = "1.0.0")] impl IntoIterator for HashSet where T: Eq + Hash, diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 139693ccdbcb..7c9a8a7b4b5a 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 1b9b13d4bd40..00bb7f86b170 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 1412dbd70b9c..fe39954f0d44 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+Send>, #[cfg(not(stage0))] invoke: Box+Send + 'a>, diff --git a/src/libunicode/lib.rs b/src/libunicode/lib.rs index 89b310d49497..791886be1ce5 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 56948ea1219e..4759c44259d5 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 f99d3eb1c7d4..3f226a1985e7 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(); } }