about summary refs log tree commit diff
path: root/src/libcore/num
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2013-04-24 22:26:14 +1000
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2013-04-25 08:20:00 +1000
commitd4868ee74085c2dc2943ef9407ced2d06e43abf6 (patch)
treedfebe34e96baecb1a8c2e1e2fa2f95fcfbe70db7 /src/libcore/num
parent03932f0b84e94f0ef96e4a6de6cb16ab436311e4 (diff)
downloadrust-d4868ee74085c2dc2943ef9407ced2d06e43abf6.tar.gz
rust-d4868ee74085c2dc2943ef9407ced2d06e43abf6.zip
Use #[cfg(not(stage0))] to exclude items from stage0
As requested on the mailing list: https://mail.mozilla.org/pipermail/rust-dev/2013-April/003713.html
Diffstat (limited to 'src/libcore/num')
-rw-r--r--src/libcore/num/f32.rs10
-rw-r--r--src/libcore/num/f64.rs8
-rw-r--r--src/libcore/num/float.rs8
-rw-r--r--src/libcore/num/int-template.rs10
-rw-r--r--src/libcore/num/num.rs4
-rw-r--r--src/libcore/num/uint-template.rs10
6 files changed, 11 insertions, 39 deletions
diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs
index e72356aa3cb..9e4140adcd1 100644
--- a/src/libcore/num/f32.rs
+++ b/src/libcore/num/f32.rs
@@ -278,10 +278,7 @@ impl Div<f32,f32> for f32 {
     #[inline(always)]
     fn div(&self, other: &f32) -> f32 { *self / *other }
 }
-
-#[cfg(stage1,notest)]
-#[cfg(stage2,notest)]
-#[cfg(stage3,notest)]
+#[cfg(not(stage0),notest)]
 impl Quot<f32,f32> for f32 {
     #[inline(always)]
     fn quot(&self, other: &f32) -> f32 { *self / *other }
@@ -292,10 +289,7 @@ impl Modulo<f32,f32> for f32 {
     #[inline(always)]
     fn modulo(&self, other: &f32) -> f32 { *self % *other }
 }
-
-#[cfg(stage1,notest)]
-#[cfg(stage2,notest)]
-#[cfg(stage3,notest)]
+#[cfg(not(stage0),notest)]
 impl Rem<f32,f32> 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 c9867f5e6d4..12f86337e85 100644
--- a/src/libcore/num/f64.rs
+++ b/src/libcore/num/f64.rs
@@ -292,9 +292,7 @@ impl Mul<f64,f64> for f64 {
 impl Div<f64,f64> for f64 {
     fn div(&self, other: &f64) -> f64 { *self / *other }
 }
-#[cfg(stage1,notest)]
-#[cfg(stage2,notest)]
-#[cfg(stage3,notest)]
+#[cfg(not(stage0),notest)]
 impl Quot<f64,f64> for f64 {
     #[inline(always)]
     fn quot(&self, other: &f64) -> f64 { *self / *other }
@@ -303,9 +301,7 @@ impl Quot<f64,f64> for f64 {
 impl Modulo<f64,f64> for f64 {
     fn modulo(&self, other: &f64) -> f64 { *self % *other }
 }
-#[cfg(stage1,notest)]
-#[cfg(stage2,notest)]
-#[cfg(stage3,notest)]
+#[cfg(not(stage0),notest)]
 impl Rem<f64,f64> 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 e2f3a4cbcdb..88321e6b8bf 100644
--- a/src/libcore/num/float.rs
+++ b/src/libcore/num/float.rs
@@ -459,9 +459,7 @@ impl Div<float,float> for float {
     #[inline(always)]
     fn div(&self, other: &float) -> float { *self / *other }
 }
-#[cfg(stage1,notest)]
-#[cfg(stage2,notest)]
-#[cfg(stage3,notest)]
+#[cfg(not(stage0),notest)]
 impl Quot<float,float> for float {
     #[inline(always)]
     fn quot(&self, other: &float) -> float { *self / *other }
@@ -471,9 +469,7 @@ impl Modulo<float,float> for float {
     #[inline(always)]
     fn modulo(&self, other: &float) -> float { *self % *other }
 }
-#[cfg(stage1,notest)]
-#[cfg(stage2,notest)]
-#[cfg(stage3,notest)]
+#[cfg(not(stage0),notest)]
 impl Rem<float,float> 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 6598efa759e..cb29b9e4486 100644
--- a/src/libcore/num/int-template.rs
+++ b/src/libcore/num/int-template.rs
@@ -185,10 +185,7 @@ impl Div<T,T> for T {
     #[inline(always)]
     fn div(&self, other: &T) -> T { *self / *other }
 }
-
-#[cfg(stage1,notest)]
-#[cfg(stage2,notest)]
-#[cfg(stage3,notest)]
+#[cfg(not(stage0),notest)]
 impl Quot<T,T> for T {
     /**
      * Returns the integer quotient, truncated towards 0. As this behaviour reflects
@@ -217,10 +214,7 @@ impl Modulo<T,T> for T {
     #[inline(always)]
     fn modulo(&self, other: &T) -> T { *self % *other }
 }
-
-#[cfg(stage1,notest)]
-#[cfg(stage2,notest)]
-#[cfg(stage3,notest)]
+#[cfg(not(stage0),notest)]
 impl Rem<T,T> for T {
     /**
      * Returns the integer remainder after division, satisfying:
diff --git a/src/libcore/num/num.rs b/src/libcore/num/num.rs
index 62ed80114d3..8304179c346 100644
--- a/src/libcore/num/num.rs
+++ b/src/libcore/num/num.rs
@@ -16,9 +16,7 @@ use ops::{Add, Sub, Mul, Neg};
 use Quot = ops::Div;
 #[cfg(stage0)]
 use Rem = ops::Modulo;
-#[cfg(stage1)]
-#[cfg(stage2)]
-#[cfg(stage3)]
+#[cfg(not(stage0))]
 use ops::{Add, Sub, Mul, Quot, Rem, Neg};
 use option::Option;
 use kinds::Copy;
diff --git a/src/libcore/num/uint-template.rs b/src/libcore/num/uint-template.rs
index fc0fe2d3a4d..2ee64d4e4ea 100644
--- a/src/libcore/num/uint-template.rs
+++ b/src/libcore/num/uint-template.rs
@@ -151,10 +151,7 @@ impl Div<T,T> for T {
     #[inline(always)]
     fn div(&self, other: &T) -> T { *self / *other }
 }
-
-#[cfg(stage1,notest)]
-#[cfg(stage2,notest)]
-#[cfg(stage3,notest)]
+#[cfg(not(stage0),notest)]
 impl Quot<T,T> for T {
     #[inline(always)]
     fn quot(&self, other: &T) -> T { *self / *other }
@@ -165,10 +162,7 @@ impl Modulo<T,T> for T {
     #[inline(always)]
     fn modulo(&self, other: &T) -> T { *self % *other }
 }
-
-#[cfg(stage1,notest)]
-#[cfg(stage2,notest)]
-#[cfg(stage3,notest)]
+#[cfg(not(stage0),notest)]
 impl Rem<T,T> for T {
     #[inline(always)]
     fn rem(&self, other: &T) -> T { *self % *other }