about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-06-24 23:14:01 -0700
committerbors <bors@rust-lang.org>2013-06-24 23:14:01 -0700
commit5a089c252e1645c1b321c8b6811f89ae3fea4bd2 (patch)
tree3d937cd8d79e363e42d41468b65fb3b74140ebfb /src/libstd
parent237ca7dc58fcc2b856c53bc1e4ab0ed060314a72 (diff)
parent122f25dd5e1dae124bdc8d3beeac55474d7a8ce5 (diff)
downloadrust-5a089c252e1645c1b321c8b6811f89ae3fea4bd2.tar.gz
rust-5a089c252e1645c1b321c8b6811f89ae3fea4bd2.zip
auto merge of #7370 : Aatch/rust/snapshot, r=huonw
I also cleaned up the warnings.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/iterator.rs5
-rw-r--r--src/libstd/to_str.rs4
-rw-r--r--src/libstd/unstable/intrinsics.rs50
-rw-r--r--src/libstd/vec.rs2
4 files changed, 1 insertions, 60 deletions
diff --git a/src/libstd/iterator.rs b/src/libstd/iterator.rs
index d96191f296d..9177ecabed6 100644
--- a/src/libstd/iterator.rs
+++ b/src/libstd/iterator.rs
@@ -43,7 +43,6 @@ pub trait Iterator<A> {
     /// Return a lower bound and upper bound on the remaining length of the iterator.
     ///
     /// The common use case for the estimate is pre-allocating space to store the results.
-    #[cfg(not(stage0))]
     fn size_hint(&self) -> (Option<uint>, Option<uint>) { (None, None) }
 }
 
@@ -610,7 +609,6 @@ impl<A, T: Iterator<A>, U: Iterator<A>> Iterator<A> for ChainIterator<A, T, U> {
     }
 
     #[inline]
-    #[cfg(not(stage0))]
     fn size_hint(&self) -> (Option<uint>, Option<uint>) {
         let (a_lower, a_upper) = self.a.size_hint();
         let (b_lower, b_upper) = self.b.size_hint();
@@ -664,7 +662,6 @@ impl<'self, A, B, T: Iterator<A>> Iterator<B> for MapIterator<'self, A, B, T> {
     }
 
     #[inline]
-    #[cfg(not(stage0))]
     fn size_hint(&self) -> (Option<uint>, Option<uint>) {
         self.iter.size_hint()
     }
@@ -690,7 +687,6 @@ impl<'self, A, T: Iterator<A>> Iterator<A> for FilterIterator<'self, A, T> {
     }
 
     #[inline]
-    #[cfg(not(stage0))]
     fn size_hint(&self) -> (Option<uint>, Option<uint>) {
         let (_, upper) = self.iter.size_hint();
         (None, upper) // can't know a lower bound, due to the predicate
@@ -716,7 +712,6 @@ impl<'self, A, B, T: Iterator<A>> Iterator<B> for FilterMapIterator<'self, A, B,
     }
 
     #[inline]
-    #[cfg(not(stage0))]
     fn size_hint(&self) -> (Option<uint>, Option<uint>) {
         let (_, upper) = self.iter.size_hint();
         (None, upper) // can't know a lower bound, due to the predicate
diff --git a/src/libstd/to_str.rs b/src/libstd/to_str.rs
index 9f812288621..4d5bc0f8842 100644
--- a/src/libstd/to_str.rs
+++ b/src/libstd/to_str.rs
@@ -18,11 +18,9 @@ use str::OwnedStr;
 use hashmap::HashMap;
 use hashmap::HashSet;
 use iterator::IteratorUtil;
-use container::Map;
 use hash::Hash;
 use cmp::Eq;
 use vec::ImmutableVector;
-use iterator::IteratorUtil;
 
 /// A generic trait for converting a value to a string
 pub trait ToStr {
@@ -179,7 +177,7 @@ impl<A:ToStr> ToStr for @[A] {
 mod tests {
     use hashmap::HashMap;
     use hashmap::HashSet;
-    use container::Set;
+    use container::{Set,Map};
     #[test]
     fn test_simple_types() {
         assert_eq!(1i.to_str(), ~"1");
diff --git a/src/libstd/unstable/intrinsics.rs b/src/libstd/unstable/intrinsics.rs
index c38b013a75a..109f665e41d 100644
--- a/src/libstd/unstable/intrinsics.rs
+++ b/src/libstd/unstable/intrinsics.rs
@@ -42,9 +42,7 @@ pub extern "rust-intrinsic" {
     /// Atomic compare and exchange, release ordering.
     pub fn atomic_cxchg_rel(dst: &mut int, old: int, src: int) -> int;
 
-    #[cfg(not(stage0))]
     pub fn atomic_cxchg_acqrel(dst: &mut int, old: int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_cxchg_relaxed(dst: &mut int, old: int, src: int) -> int;
 
 
@@ -53,7 +51,6 @@ pub extern "rust-intrinsic" {
     /// Atomic load, acquire ordering.
     pub fn atomic_load_acq(src: &int) -> int;
 
-    #[cfg(not(stage0))]
     pub fn atomic_load_relaxed(src: &int) -> int;
 
     /// Atomic store, sequentially consistent.
@@ -61,7 +58,6 @@ pub extern "rust-intrinsic" {
     /// Atomic store, release ordering.
     pub fn atomic_store_rel(dst: &mut int, val: int);
 
-    #[cfg(not(stage0))]
     pub fn atomic_store_relaxed(dst: &mut int, val: int);
 
     /// Atomic exchange, sequentially consistent.
@@ -70,9 +66,7 @@ pub extern "rust-intrinsic" {
     pub fn atomic_xchg_acq(dst: &mut int, src: int) -> int;
     /// Atomic exchange, release ordering.
     pub fn atomic_xchg_rel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_xchg_acqrel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_xchg_relaxed(dst: &mut int, src: int) -> int;
 
     /// Atomic addition, sequentially consistent.
@@ -81,9 +75,7 @@ pub extern "rust-intrinsic" {
     pub fn atomic_xadd_acq(dst: &mut int, src: int) -> int;
     /// Atomic addition, release ordering.
     pub fn atomic_xadd_rel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_xadd_acqrel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_xadd_relaxed(dst: &mut int, src: int) -> int;
 
     /// Atomic subtraction, sequentially consistent.
@@ -92,97 +84,55 @@ pub extern "rust-intrinsic" {
     pub fn atomic_xsub_acq(dst: &mut int, src: int) -> int;
     /// Atomic subtraction, release ordering.
     pub fn atomic_xsub_rel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_xsub_acqrel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_xsub_relaxed(dst: &mut int, src: int) -> int;
 
-    #[cfg(not(stage0))]
     pub fn atomic_and(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_and_acq(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_and_rel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_and_acqrel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_and_relaxed(dst: &mut int, src: int) -> int;
 
-    #[cfg(not(stage0))]
     pub fn atomic_nand(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_nand_acq(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_nand_rel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_nand_acqrel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_nand_relaxed(dst: &mut int, src: int) -> int;
 
-    #[cfg(not(stage0))]
     pub fn atomic_or(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_or_acq(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_or_rel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_or_acqrel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_or_relaxed(dst: &mut int, src: int) -> int;
 
-    #[cfg(not(stage0))]
     pub fn atomic_xor(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_xor_acq(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_xor_rel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_xor_acqrel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_xor_relaxed(dst: &mut int, src: int) -> int;
 
-    #[cfg(not(stage0))]
     pub fn atomic_max(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_max_acq(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_max_rel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_max_acqrel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_max_relaxed(dst: &mut int, src: int) -> int;
 
-    #[cfg(not(stage0))]
     pub fn atomic_min(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_min_acq(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_min_rel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_min_acqrel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_min_relaxed(dst: &mut int, src: int) -> int;
 
-    #[cfg(not(stage0))]
     pub fn atomic_umin(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_umin_acq(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_umin_rel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_umin_acqrel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_umin_relaxed(dst: &mut int, src: int) -> int;
 
-    #[cfg(not(stage0))]
     pub fn atomic_umax(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_umax_acq(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_umax_rel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_umax_acqrel(dst: &mut int, src: int) -> int;
-    #[cfg(not(stage0))]
     pub fn atomic_umax_relaxed(dst: &mut int, src: int) -> int;
 
     /// The size of a type in bytes.
diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs
index 7b7a3020b93..e39dd262cd9 100644
--- a/src/libstd/vec.rs
+++ b/src/libstd/vec.rs
@@ -2446,7 +2446,6 @@ macro_rules! iterator {
             }
 
             #[inline]
-            #[cfg(not(stage0))]
             fn size_hint(&self) -> (Option<uint>, Option<uint>) {
                 let exact = Some(((self.end as uint) - (self.ptr as uint)) / size_of::<$elem>());
                 (exact, exact)
@@ -3929,7 +3928,6 @@ mod tests {
     }
 
     #[test]
-    #[cfg(not(stage0))]
     fn test_iterator() {
         use iterator::*;
         let xs = [1, 2, 5, 10, 11];