diff --git a/src/libcore/core.rc b/src/libcore/core.rc index f9a56f613d542..f6e4056f3d0fc 100644 --- a/src/libcore/core.rc +++ b/src/libcore/core.rc @@ -75,9 +75,6 @@ they contained the following prologue: pub use kinds::{Const, Copy, Owned, Durable}; pub use ops::{Drop}; -#[cfg(stage0)] -pub use ops::{Add, Sub, Mul, Div, Modulo, Neg, Not}; -#[cfg(not(stage0))] pub use ops::{Add, Sub, Mul, Quot, Rem, Neg, Not}; pub use ops::{BitAnd, BitOr, BitXor}; pub use ops::{Shl, Shr, Index}; diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs index e687f482fa98c..6398127a5faff 100644 --- a/src/libcore/num/f32.rs +++ b/src/libcore/num/f32.rs @@ -278,24 +278,12 @@ impl Mul for f32 { #[inline(always)] fn mul(&self, other: &f32) -> f32 { *self * *other } } - -#[cfg(stage0,notest)] -impl Div for f32 { - #[inline(always)] - fn div(&self, other: &f32) -> f32 { *self / *other } -} -#[cfg(not(stage0),notest)] +#[cfg(notest)] impl Quot for f32 { #[inline(always)] fn quot(&self, other: &f32) -> f32 { *self / *other } } - -#[cfg(stage0,notest)] -impl Modulo for f32 { - #[inline(always)] - fn modulo(&self, other: &f32) -> f32 { *self % *other } -} -#[cfg(not(stage0),notest)] +#[cfg(notest)] impl Rem for f32 { #[inline(always)] fn rem(&self, other: &f32) -> f32 { *self % *other } diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs index d00e6ae2c0d79..013f3c5095e2a 100644 --- a/src/libcore/num/f64.rs +++ b/src/libcore/num/f64.rs @@ -296,20 +296,12 @@ impl Sub for f64 { impl Mul for f64 { fn mul(&self, other: &f64) -> f64 { *self * *other } } -#[cfg(stage0,notest)] -impl Div for f64 { - fn div(&self, other: &f64) -> f64 { *self / *other } -} -#[cfg(not(stage0),notest)] +#[cfg(notest)] impl Quot for f64 { #[inline(always)] fn quot(&self, other: &f64) -> f64 { *self / *other } } -#[cfg(stage0,notest)] -impl Modulo for f64 { - fn modulo(&self, other: &f64) -> f64 { *self % *other } -} -#[cfg(not(stage0),notest)] +#[cfg(notest)] impl Rem for f64 { #[inline(always)] fn rem(&self, other: &f64) -> f64 { *self % *other } diff --git a/src/libcore/num/float.rs b/src/libcore/num/float.rs index 3aa8848cdbed2..496ad4ec176b7 100644 --- a/src/libcore/num/float.rs +++ b/src/libcore/num/float.rs @@ -691,23 +691,12 @@ impl Mul for float { #[inline(always)] fn mul(&self, other: &float) -> float { *self * *other } } - -#[cfg(stage0,notest)] -impl Div for float { - #[inline(always)] - fn div(&self, other: &float) -> float { *self / *other } -} -#[cfg(not(stage0),notest)] +#[cfg(notest)] impl Quot for float { #[inline(always)] fn quot(&self, other: &float) -> float { *self / *other } } -#[cfg(stage0,notest)] -impl Modulo for float { - #[inline(always)] - fn modulo(&self, other: &float) -> float { *self % *other } -} -#[cfg(not(stage0),notest)] +#[cfg(notest)] impl Rem for float { #[inline(always)] fn rem(&self, other: &float) -> float { *self % *other } diff --git a/src/libcore/num/int-template.rs b/src/libcore/num/int-template.rs index ec38a32c039d6..85489755fc7a9 100644 --- a/src/libcore/num/int-template.rs +++ b/src/libcore/num/int-template.rs @@ -200,13 +200,6 @@ impl Mul for T { #[inline(always)] fn mul(&self, other: &T) -> T { *self * *other } } - -#[cfg(stage0,notest)] -impl Div for T { - #[inline(always)] - fn div(&self, other: &T) -> T { *self / *other } -} -#[cfg(not(stage0),notest)] impl Quot for T { /// /// Returns the integer quotient, truncated towards 0. As this behaviour reflects @@ -229,13 +222,6 @@ impl Quot for T { #[inline(always)] fn quot(&self, other: &T) -> T { *self / *other } } - -#[cfg(stage0,notest)] -impl Modulo for T { - #[inline(always)] - fn modulo(&self, other: &T) -> T { *self % *other } -} -#[cfg(not(stage0),notest)] impl Rem for T { /// /// Returns the integer remainder after division, satisfying: diff --git a/src/libcore/num/num.rs b/src/libcore/num/num.rs index 3e43ebfef1222..de7597fa821d6 100644 --- a/src/libcore/num/num.rs +++ b/src/libcore/num/num.rs @@ -10,13 +10,6 @@ //! An interface for numeric types use cmp::{Eq, Ord}; -#[cfg(stage0)] -use ops::{Add, Sub, Mul, Neg}; -#[cfg(stage0)] -use Quot = ops::Div; -#[cfg(stage0)] -use Rem = ops::Modulo; -#[cfg(not(stage0))] use ops::{Add, Sub, Mul, Quot, Rem, Neg}; use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr}; use option::Option; @@ -391,25 +384,8 @@ pub fn pow_with_uint+Mul>( total } -/// Helper function for testing numeric operations -#[cfg(stage0,test)] -pub fn test_num(ten: T, two: T) { - assert_eq!(ten.add(&two), cast(12)); - assert_eq!(ten.sub(&two), cast(8)); - assert_eq!(ten.mul(&two), cast(20)); - assert_eq!(ten.div(&two), cast(5)); - assert_eq!(ten.modulo(&two), cast(0)); - - assert_eq!(ten.add(&two), ten + two); - assert_eq!(ten.sub(&two), ten - two); - assert_eq!(ten.mul(&two), ten * two); - assert_eq!(ten.div(&two), ten / two); - assert_eq!(ten.modulo(&two), ten % two); -} -#[cfg(stage1,test)] -#[cfg(stage2,test)] -#[cfg(stage3,test)] -pub fn test_num(ten: T, two: T) { +#[cfg(test)] +fn test_num(ten: T, two: T) { assert_eq!(ten.add(&two), cast(12)); assert_eq!(ten.sub(&two), cast(8)); assert_eq!(ten.mul(&two), cast(20)); diff --git a/src/libcore/num/strconv.rs b/src/libcore/num/strconv.rs index 2f3cd92dac09e..004789e7fc1ca 100644 --- a/src/libcore/num/strconv.rs +++ b/src/libcore/num/strconv.rs @@ -9,15 +9,6 @@ // except according to those terms. use core::cmp::{Ord, Eq}; -#[cfg(stage0)] -use ops::{Add, Sub, Mul, Neg}; -#[cfg(stage0)] -use Quot = ops::Div; -#[cfg(stage0)] -use Rem = ops::Modulo; -#[cfg(stage1)] -#[cfg(stage2)] -#[cfg(stage3)] use ops::{Add, Sub, Mul, Quot, Rem, Neg}; use option::{None, Option, Some}; use char; diff --git a/src/libcore/num/uint-template.rs b/src/libcore/num/uint-template.rs index 3dfdd22c42dc1..f975226cde63b 100644 --- a/src/libcore/num/uint-template.rs +++ b/src/libcore/num/uint-template.rs @@ -165,24 +165,10 @@ impl Mul for T { #[inline(always)] fn mul(&self, other: &T) -> T { *self * *other } } - -#[cfg(stage0,notest)] -impl Div for T { - #[inline(always)] - fn div(&self, other: &T) -> T { *self / *other } -} -#[cfg(not(stage0),notest)] impl Quot for T { #[inline(always)] fn quot(&self, other: &T) -> T { *self / *other } } - -#[cfg(stage0,notest)] -impl Modulo for T { - #[inline(always)] - fn modulo(&self, other: &T) -> T { *self % *other } -} -#[cfg(not(stage0),notest)] impl Rem for T { #[inline(always)] fn rem(&self, other: &T) -> T { *self % *other } diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 1aa7aada05c88..18dcf34e49bfb 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -30,24 +30,12 @@ pub trait Mul { fn mul(&self, rhs: &RHS) -> Result; } -#[lang="div"] -#[cfg(stage0)] -pub trait Div { - fn div(&self, rhs: &RHS) -> Result; -} #[lang="quot"] -#[cfg(not(stage0))] pub trait Quot { fn quot(&self, rhs: &RHS) -> Result; } -#[lang="modulo"] -#[cfg(stage0)] -pub trait Modulo { - fn modulo(&self, rhs: &RHS) -> Result; -} #[lang="rem"] -#[cfg(not(stage0))] pub trait Rem { fn rem(&self, rhs: &RHS) -> Result; } diff --git a/src/libcore/prelude.rs b/src/libcore/prelude.rs index 9a2e480ce6e54..318725d2822a5 100644 --- a/src/libcore/prelude.rs +++ b/src/libcore/prelude.rs @@ -14,9 +14,6 @@ pub use either::{Either, Left, Right}; pub use kinds::{Const, Copy, Owned, Durable}; -#[cfg(stage0)] -pub use ops::{Add, Sub, Mul, Div, Modulo, Neg, Not}; -#[cfg(not(stage0))] pub use ops::{Add, Sub, Mul, Quot, Rem, Neg, Not}; pub use ops::{BitAnd, BitOr, BitXor}; pub use ops::{Drop}; diff --git a/src/libcore/repr.rs b/src/libcore/repr.rs index 2d6412b0cc832..abcb727809eea 100644 --- a/src/libcore/repr.rs +++ b/src/libcore/repr.rs @@ -23,7 +23,6 @@ use io::{Writer, WriterUtil}; use libc::c_void; use managed; use ptr; -#[cfg(stage0)] use sys; use reflect; use reflect::{MovePtr, align}; use to_str::ToStr; diff --git a/src/libcore/rt/io/mod.rs b/src/libcore/rt/io/mod.rs index b035532144c44..cb00b02d9d1b6 100644 --- a/src/libcore/rt/io/mod.rs +++ b/src/libcore/rt/io/mod.rs @@ -125,18 +125,15 @@ pub mod file; pub mod net; /// Readers and Writers for memory buffers and strings. -#[cfg(not(stage0))] // XXX Using unsnapshotted features pub mod mem; /// Non-blocking access to stdin, stdout, stderr pub mod stdio; /// Basic stream compression. XXX: Belongs with other flate code -#[cfg(not(stage0))] // XXX Using unsnapshotted features pub mod flate; /// Interop between byte streams and pipes. Not sure where it belongs -#[cfg(not(stage0))] // XXX " pub mod comm_adapters; /// Extension traits diff --git a/src/libstd/std.rc b/src/libstd/std.rc index 0a5348d79760e..40db9f89d0fd7 100644 --- a/src/libstd/std.rc +++ b/src/libstd/std.rc @@ -91,13 +91,10 @@ pub mod cmp; pub mod base64; pub mod rl; pub mod workcache; -#[cfg(not(stage0))] #[path="num/bigint.rs"] pub mod bigint; -#[cfg(not(stage0))] #[path="num/rational.rs"] pub mod rational; -#[cfg(not(stage0))] #[path="num/complex.rs"] pub mod complex; pub mod stats;