diff --git a/src/libcore/at_vec.rs b/src/libcore/at_vec.rs index 9f59f1d8fe48d..d797e02f5408d 100644 --- a/src/libcore/at_vec.rs +++ b/src/libcore/at_vec.rs @@ -166,7 +166,7 @@ pub fn from_slice(v: &[T]) -> @[T] { from_fn(v.len(), |i| v[i]) } -#[cfg(notest)] +#[cfg(not(test))] pub mod traits { use at_vec::append; use kinds::Copy; diff --git a/src/libcore/bool.rs b/src/libcore/bool.rs index 1b4b81dca267c..76a8f456cd5f3 100644 --- a/src/libcore/bool.rs +++ b/src/libcore/bool.rs @@ -10,7 +10,7 @@ //! Boolean logic -#[cfg(notest)] +#[cfg(not(test))] use cmp::{Eq, Ord, TotalOrd, Ordering}; use option::{None, Option, Some}; use from_str::FromStr; @@ -75,7 +75,7 @@ pub fn all_values(blk: &fn(v: bool)) { #[inline(always)] pub fn to_bit(v: bool) -> u8 { if v { 1u8 } else { 0u8 } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for bool { #[inline(always)] fn lt(&self, other: &bool) -> bool { to_bit(*self) < to_bit(*other) } @@ -87,13 +87,13 @@ impl Ord for bool { fn ge(&self, other: &bool) -> bool { to_bit(*self) >= to_bit(*other) } } -#[cfg(notest)] +#[cfg(not(test))] impl TotalOrd for bool { #[inline(always)] fn cmp(&self, other: &bool) -> Ordering { to_bit(*self).cmp(&to_bit(*other)) } } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for bool { #[inline(always)] fn eq(&self, other: &bool) -> bool { (*self) == (*other) } diff --git a/src/libcore/char.rs b/src/libcore/char.rs index a96f1a2ff8191..a9c46b81f862e 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -10,7 +10,7 @@ //! Utilities for manipulating the char type -#[cfg(notest)] +#[cfg(not(test))] use cmp::Ord; use option::{None, Option, Some}; use str; @@ -18,7 +18,7 @@ use u32; use uint; use unicode::{derived_property, general_category}; -#[cfg(notest)] use cmp::Eq; +#[cfg(not(test))] use cmp::Eq; /* Lu Uppercase_Letter an uppercase letter @@ -244,7 +244,7 @@ pub fn len_utf8_bytes(c: char) -> uint { else { fail!(~"invalid character!") } } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for char { #[inline(always)] fn eq(&self, other: &char) -> bool { (*self) == (*other) } @@ -252,7 +252,7 @@ impl Eq for char { fn ne(&self, other: &char) -> bool { (*self) != (*other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for char { #[inline(always)] fn lt(&self, other: &char) -> bool { *self < *other } diff --git a/src/libcore/cleanup.rs b/src/libcore/cleanup.rs index 424cc3483092d..912f965db7c9a 100644 --- a/src/libcore/cleanup.rs +++ b/src/libcore/cleanup.rs @@ -15,9 +15,9 @@ use ptr::mut_null; use repr::BoxRepr; use sys::TypeDesc; use cast::transmute; -#[cfg(notest)] use unstable::lang::clear_task_borrow_list; +#[cfg(not(test))] use unstable::lang::clear_task_borrow_list; -#[cfg(notest)] use ptr::to_unsafe_ptr; +#[cfg(not(test))] use ptr::to_unsafe_ptr; /** * Runtime structures @@ -164,7 +164,7 @@ fn debug_mem() -> bool { } /// Destroys all managed memory (i.e. @ boxes) held by the current task. -#[cfg(notest)] +#[cfg(not(test))] #[lang="annihilate"] pub unsafe fn annihilate() { use unstable::lang::local_free; diff --git a/src/libcore/core.rc b/src/libcore/core.rc index 127d6dbc77432..c8ab49f273e12 100644 --- a/src/libcore/core.rc +++ b/src/libcore/core.rc @@ -179,9 +179,9 @@ pub mod managed; /* Core language traits */ -#[cfg(notest)] pub mod kinds; -#[cfg(notest)] pub mod ops; -#[cfg(notest)] pub mod cmp; +#[cfg(not(test))] pub mod kinds; +#[cfg(not(test))] pub mod ops; +#[cfg(not(test))] pub mod cmp; /* Common traits */ diff --git a/src/libcore/logging.rs b/src/libcore/logging.rs index afe8338f2ce6a..69ecad56a8f5c 100644 --- a/src/libcore/logging.rs +++ b/src/libcore/logging.rs @@ -42,7 +42,7 @@ pub fn console_off() { } } -#[cfg(notest)] +#[cfg(not(test))] #[lang="log_type"] pub fn log_type(level: u32, object: &T) { use cast::transmute; diff --git a/src/libcore/managed.rs b/src/libcore/managed.rs index debca1ead82f8..d2bb88ca30202 100644 --- a/src/libcore/managed.rs +++ b/src/libcore/managed.rs @@ -12,7 +12,7 @@ use ptr::to_unsafe_ptr; -#[cfg(notest)] use cmp::{Eq, Ord}; +#[cfg(not(test))] use cmp::{Eq, Ord}; pub mod raw { use intrinsic::TyDesc; @@ -49,7 +49,7 @@ pub fn mut_ptr_eq(a: @mut T, b: @mut T) -> bool { a_ptr == b_ptr } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for @T { #[inline(always)] fn eq(&self, other: &@T) -> bool { *(*self) == *(*other) } @@ -57,7 +57,7 @@ impl Eq for @T { fn ne(&self, other: &@T) -> bool { *(*self) != *(*other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for @mut T { #[inline(always)] fn eq(&self, other: &@mut T) -> bool { *(*self) == *(*other) } @@ -65,7 +65,7 @@ impl Eq for @mut T { fn ne(&self, other: &@mut T) -> bool { *(*self) != *(*other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for @T { #[inline(always)] fn lt(&self, other: &@T) -> bool { *(*self) < *(*other) } @@ -77,7 +77,7 @@ impl Ord for @T { fn gt(&self, other: &@T) -> bool { *(*self) > *(*other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for @mut T { #[inline(always)] fn lt(&self, other: &@mut T) -> bool { *(*self) < *(*other) } diff --git a/src/libcore/nil.rs b/src/libcore/nil.rs index 6b8c390fc2575..833bd3459cebf 100644 --- a/src/libcore/nil.rs +++ b/src/libcore/nil.rs @@ -14,10 +14,10 @@ Functions for the unit type. */ -#[cfg(notest)] +#[cfg(not(test))] use prelude::*; -#[cfg(notest)] +#[cfg(not(test))] impl Eq for () { #[inline(always)] fn eq(&self, _other: &()) -> bool { true } @@ -25,7 +25,7 @@ impl Eq for () { fn ne(&self, _other: &()) -> bool { false } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for () { #[inline(always)] fn lt(&self, _other: &()) -> bool { false } @@ -37,13 +37,13 @@ impl Ord for () { fn gt(&self, _other: &()) -> bool { false } } -#[cfg(notest)] +#[cfg(not(test))] impl TotalOrd for () { #[inline(always)] fn cmp(&self, _other: &()) -> Ordering { Equal } } -#[cfg(notest)] +#[cfg(not(test))] impl TotalEq for () { #[inline(always)] fn equals(&self, _other: &()) -> bool { true } diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs index 3c4faa95dd190..93e881c50e82f 100644 --- a/src/libcore/num/f32.rs +++ b/src/libcore/num/f32.rs @@ -198,7 +198,7 @@ pub mod consts { impl Num for f32 {} -#[cfg(notest)] +#[cfg(not(test))] impl Eq for f32 { #[inline(always)] fn eq(&self, other: &f32) -> bool { (*self) == (*other) } @@ -206,7 +206,7 @@ impl Eq for f32 { fn ne(&self, other: &f32) -> bool { (*self) != (*other) } } -#[cfg(notest)] +#[cfg(not(test))] impl ApproxEq for f32 { #[inline(always)] fn approx_epsilon() -> f32 { 1.0e-6 } @@ -222,7 +222,7 @@ impl ApproxEq for f32 { } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for f32 { #[inline(always)] fn lt(&self, other: &f32) -> bool { (*self) < (*other) } @@ -272,37 +272,37 @@ impl One for f32 { fn one() -> f32 { 1.0 } } -#[cfg(notest)] +#[cfg(not(test))] impl Add for f32 { #[inline(always)] fn add(&self, other: &f32) -> f32 { *self + *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Sub for f32 { #[inline(always)] fn sub(&self, other: &f32) -> f32 { *self - *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Mul for f32 { #[inline(always)] fn mul(&self, other: &f32) -> f32 { *self * *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Div for f32 { #[inline(always)] fn div(&self, other: &f32) -> f32 { *self / *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Rem for f32 { #[inline(always)] fn rem(&self, other: &f32) -> f32 { *self % *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Neg for f32 { #[inline(always)] fn neg(&self) -> f32 { -*self } diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs index 30c101fe8a9c6..096206d718301 100644 --- a/src/libcore/num/f64.rs +++ b/src/libcore/num/f64.rs @@ -221,7 +221,7 @@ pub mod consts { impl Num for f64 {} -#[cfg(notest)] +#[cfg(not(test))] impl Eq for f64 { #[inline(always)] fn eq(&self, other: &f64) -> bool { (*self) == (*other) } @@ -229,7 +229,7 @@ impl Eq for f64 { fn ne(&self, other: &f64) -> bool { (*self) != (*other) } } -#[cfg(notest)] +#[cfg(not(test))] impl ApproxEq for f64 { #[inline(always)] fn approx_epsilon() -> f64 { 1.0e-6 } @@ -245,7 +245,7 @@ impl ApproxEq for f64 { } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for f64 { #[inline(always)] fn lt(&self, other: &f64) -> bool { (*self) < (*other) } @@ -295,28 +295,28 @@ impl One for f64 { fn one() -> f64 { 1.0 } } -#[cfg(notest)] +#[cfg(not(test))] impl Add for f64 { fn add(&self, other: &f64) -> f64 { *self + *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Sub for f64 { fn sub(&self, other: &f64) -> f64 { *self - *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Mul for f64 { fn mul(&self, other: &f64) -> f64 { *self * *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Div for f64 { fn div(&self, other: &f64) -> f64 { *self / *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Rem for f64 { #[inline(always)] fn rem(&self, other: &f64) -> f64 { *self % *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Neg for f64 { fn neg(&self) -> f64 { -*self } } diff --git a/src/libcore/num/float.rs b/src/libcore/num/float.rs index 9c3d30be0d499..e6a2ed7ea9759 100644 --- a/src/libcore/num/float.rs +++ b/src/libcore/num/float.rs @@ -363,7 +363,7 @@ pub fn tan(x: float) -> float { impl Num for float {} -#[cfg(notest)] +#[cfg(not(test))] impl Eq for float { #[inline(always)] fn eq(&self, other: &float) -> bool { (*self) == (*other) } @@ -371,7 +371,7 @@ impl Eq for float { fn ne(&self, other: &float) -> bool { (*self) != (*other) } } -#[cfg(notest)] +#[cfg(not(test))] impl ApproxEq for float { #[inline(always)] fn approx_epsilon() -> float { 1.0e-6 } @@ -387,7 +387,7 @@ impl ApproxEq for float { } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for float { #[inline(always)] fn lt(&self, other: &float) -> bool { (*self) < (*other) } @@ -695,36 +695,36 @@ impl RealExt for float { fn yn(&self, n: int) -> float { yn(n as c_int, *self as f64) as float } } -#[cfg(notest)] +#[cfg(not(test))] impl Add for float { #[inline(always)] fn add(&self, other: &float) -> float { *self + *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Sub for float { #[inline(always)] fn sub(&self, other: &float) -> float { *self - *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Mul for float { #[inline(always)] fn mul(&self, other: &float) -> float { *self * *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Div for float { #[inline(always)] fn div(&self, other: &float) -> float { *self / *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Rem for float { #[inline(always)] fn rem(&self, other: &float) -> float { *self % *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Neg for float { #[inline(always)] fn neg(&self) -> float { -*self } diff --git a/src/libcore/num/int-template.rs b/src/libcore/num/int-template.rs index 06a9a0b45627d..9ee5ba4753db0 100644 --- a/src/libcore/num/int-template.rs +++ b/src/libcore/num/int-template.rs @@ -131,7 +131,7 @@ pub fn abs(i: T) -> T { i.abs() } impl Num for T {} -#[cfg(notest)] +#[cfg(not(test))] impl Ord for T { #[inline(always)] fn lt(&self, other: &T) -> bool { return (*self) < (*other); } @@ -143,7 +143,7 @@ impl Ord for T { fn gt(&self, other: &T) -> bool { return (*self) > (*other); } } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for T { #[inline(always)] fn eq(&self, other: &T) -> bool { return (*self) == (*other); } @@ -182,25 +182,25 @@ impl One for T { fn one() -> T { 1 } } -#[cfg(notest)] +#[cfg(not(test))] impl Add for T { #[inline(always)] fn add(&self, other: &T) -> T { *self + *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Sub for T { #[inline(always)] fn sub(&self, other: &T) -> T { *self - *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Mul for T { #[inline(always)] fn mul(&self, other: &T) -> T { *self * *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Div for T { /// /// Integer division, truncated towards 0. As this behaviour reflects the underlying @@ -224,7 +224,7 @@ impl Div for T { fn div(&self, other: &T) -> T { *self / *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Rem for T { /// /// Returns the integer remainder after division, satisfying: @@ -251,7 +251,7 @@ impl Rem for T { fn rem(&self, other: &T) -> T { *self % *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Neg for T { #[inline(always)] fn neg(&self) -> T { -*self } @@ -417,37 +417,37 @@ impl Integer for T { impl Bitwise for T {} -#[cfg(notest)] +#[cfg(not(test))] impl BitOr for T { #[inline(always)] fn bitor(&self, other: &T) -> T { *self | *other } } -#[cfg(notest)] +#[cfg(not(test))] impl BitAnd for T { #[inline(always)] fn bitand(&self, other: &T) -> T { *self & *other } } -#[cfg(notest)] +#[cfg(not(test))] impl BitXor for T { #[inline(always)] fn bitxor(&self, other: &T) -> T { *self ^ *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Shl for T { #[inline(always)] fn shl(&self, other: &T) -> T { *self << *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Shr for T { #[inline(always)] fn shr(&self, other: &T) -> T { *self >> *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Not for T { #[inline(always)] fn not(&self) -> T { !*self } diff --git a/src/libcore/num/uint-template.rs b/src/libcore/num/uint-template.rs index 6d0f1fe1fc72b..dcb0865cb9b98 100644 --- a/src/libcore/num/uint-template.rs +++ b/src/libcore/num/uint-template.rs @@ -96,7 +96,7 @@ pub fn compl(i: T) -> T { impl Num for T {} -#[cfg(notest)] +#[cfg(not(test))] impl Ord for T { #[inline(always)] fn lt(&self, other: &T) -> bool { (*self) < (*other) } @@ -108,7 +108,7 @@ impl Ord for T { fn gt(&self, other: &T) -> bool { (*self) > (*other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for T { #[inline(always)] fn eq(&self, other: &T) -> bool { return (*self) == (*other); } @@ -147,37 +147,37 @@ impl One for T { fn one() -> T { 1 } } -#[cfg(notest)] +#[cfg(not(test))] impl Add for T { #[inline(always)] fn add(&self, other: &T) -> T { *self + *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Sub for T { #[inline(always)] fn sub(&self, other: &T) -> T { *self - *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Mul for T { #[inline(always)] fn mul(&self, other: &T) -> T { *self * *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Div for T { #[inline(always)] fn div(&self, other: &T) -> T { *self / *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Rem for T { #[inline(always)] fn rem(&self, other: &T) -> T { *self % *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Neg for T { #[inline(always)] fn neg(&self) -> T { -*self } @@ -240,37 +240,37 @@ impl Integer for T { impl Bitwise for T {} -#[cfg(notest)] +#[cfg(not(test))] impl BitOr for T { #[inline(always)] fn bitor(&self, other: &T) -> T { *self | *other } } -#[cfg(notest)] +#[cfg(not(test))] impl BitAnd for T { #[inline(always)] fn bitand(&self, other: &T) -> T { *self & *other } } -#[cfg(notest)] +#[cfg(not(test))] impl BitXor for T { #[inline(always)] fn bitxor(&self, other: &T) -> T { *self ^ *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Shl for T { #[inline(always)] fn shl(&self, other: &T) -> T { *self << *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Shr for T { #[inline(always)] fn shr(&self, other: &T) -> T { *self >> *other } } -#[cfg(notest)] +#[cfg(not(test))] impl Not for T { #[inline(always)] fn not(&self) -> T { !*self } diff --git a/src/libcore/owned.rs b/src/libcore/owned.rs index 599591e2f6d7a..3262fb4afdcf6 100644 --- a/src/libcore/owned.rs +++ b/src/libcore/owned.rs @@ -10,9 +10,9 @@ //! Operations on unique pointer types -#[cfg(notest)] use cmp::{Eq, Ord}; +#[cfg(not(test))] use cmp::{Eq, Ord}; -#[cfg(notest)] +#[cfg(not(test))] impl Eq for ~T { #[inline(always)] fn eq(&self, other: &~T) -> bool { *(*self) == *(*other) } @@ -20,7 +20,7 @@ impl Eq for ~T { fn ne(&self, other: &~T) -> bool { *(*self) != *(*other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for ~T { #[inline(always)] fn lt(&self, other: &~T) -> bool { *(*self) < *(*other) } diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 85e46a0feff6b..7f2165185eb88 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -15,7 +15,7 @@ use libc; use libc::{c_void, size_t}; use sys; -#[cfg(notest)] use cmp::{Eq, Ord}; +#[cfg(not(test))] use cmp::{Eq, Ord}; use uint; pub mod libc_ { @@ -243,7 +243,7 @@ impl Ptr for *mut T { } // Equality for pointers -#[cfg(notest)] +#[cfg(not(test))] impl Eq for *const T { #[inline(always)] fn eq(&self, other: &*const T) -> bool { @@ -258,7 +258,7 @@ impl Eq for *const T { } // Comparison for pointers -#[cfg(notest)] +#[cfg(not(test))] impl Ord for *const T { #[inline(always)] fn lt(&self, other: &*const T) -> bool { @@ -295,7 +295,7 @@ impl Ord for *const T { } // Equality for region pointers -#[cfg(notest)] +#[cfg(not(test))] impl<'self,T:Eq> Eq for &'self T { #[inline(always)] fn eq(&self, other: & &'self T) -> bool { @@ -308,7 +308,7 @@ impl<'self,T:Eq> Eq for &'self T { } // Comparison for region pointers -#[cfg(notest)] +#[cfg(not(test))] impl<'self,T:Ord> Ord for &'self T { #[inline(always)] fn lt(&self, other: & &'self T) -> bool { diff --git a/src/libcore/str.rs b/src/libcore/str.rs index a41c99b266b11..44c07e86814f2 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -32,7 +32,7 @@ use uint; use vec; use to_str::ToStr; -#[cfg(notest)] use cmp::{Eq, Ord, Equiv, TotalEq}; +#[cfg(not(test))] use cmp::{Eq, Ord, Equiv, TotalEq}; /* Section: Creating a string @@ -913,7 +913,7 @@ Section: Comparing strings */ /// Bytewise slice equality -#[cfg(notest)] +#[cfg(not(test))] #[lang="str_eq"] #[inline] pub fn eq_slice(a: &str, b: &str) -> bool { @@ -949,7 +949,7 @@ pub fn eq_slice(a: &str, b: &str) -> bool { } /// Bytewise string equality -#[cfg(notest)] +#[cfg(not(test))] #[lang="uniq_str_eq"] #[inline] pub fn eq(a: &~str, b: &~str) -> bool { @@ -977,19 +977,19 @@ fn cmp(a: &str, b: &str) -> Ordering { a.len().cmp(&b.len()) } -#[cfg(notest)] +#[cfg(not(test))] impl<'self> TotalOrd for &'self str { #[inline] fn cmp(&self, other: & &'self str) -> Ordering { cmp(*self, *other) } } -#[cfg(notest)] +#[cfg(not(test))] impl TotalOrd for ~str { #[inline] fn cmp(&self, other: &~str) -> Ordering { cmp(*self, *other) } } -#[cfg(notest)] +#[cfg(not(test))] impl TotalOrd for @str { #[inline] fn cmp(&self, other: &@str) -> Ordering { cmp(*self, *other) } @@ -1030,7 +1030,7 @@ fn gt(a: &str, b: &str) -> bool { !le(a, b) } -#[cfg(notest)] +#[cfg(not(test))] impl<'self> Eq for &'self str { #[inline(always)] fn eq(&self, other: & &'self str) -> bool { @@ -1040,7 +1040,7 @@ impl<'self> Eq for &'self str { fn ne(&self, other: & &'self str) -> bool { !(*self).eq(other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for ~str { #[inline(always)] fn eq(&self, other: &~str) -> bool { @@ -1050,7 +1050,7 @@ impl Eq for ~str { fn ne(&self, other: &~str) -> bool { !(*self).eq(other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for @str { #[inline(always)] fn eq(&self, other: &@str) -> bool { @@ -1060,7 +1060,7 @@ impl Eq for @str { fn ne(&self, other: &@str) -> bool { !(*self).eq(other) } } -#[cfg(notest)] +#[cfg(not(test))] impl<'self> TotalEq for &'self str { #[inline(always)] fn equals(&self, other: & &'self str) -> bool { @@ -1068,7 +1068,7 @@ impl<'self> TotalEq for &'self str { } } -#[cfg(notest)] +#[cfg(not(test))] impl TotalEq for ~str { #[inline(always)] fn equals(&self, other: &~str) -> bool { @@ -1076,7 +1076,7 @@ impl TotalEq for ~str { } } -#[cfg(notest)] +#[cfg(not(test))] impl TotalEq for @str { #[inline(always)] fn equals(&self, other: &@str) -> bool { @@ -1084,7 +1084,7 @@ impl TotalEq for @str { } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for ~str { #[inline(always)] fn lt(&self, other: &~str) -> bool { lt((*self), (*other)) } @@ -1096,7 +1096,7 @@ impl Ord for ~str { fn gt(&self, other: &~str) -> bool { gt((*self), (*other)) } } -#[cfg(notest)] +#[cfg(not(test))] impl<'self> Ord for &'self str { #[inline(always)] fn lt(&self, other: & &'self str) -> bool { lt((*self), (*other)) } @@ -1108,7 +1108,7 @@ impl<'self> Ord for &'self str { fn gt(&self, other: & &'self str) -> bool { gt((*self), (*other)) } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for @str { #[inline(always)] fn lt(&self, other: &@str) -> bool { lt((*self), (*other)) } @@ -1120,7 +1120,7 @@ impl Ord for @str { fn gt(&self, other: &@str) -> bool { gt((*self), (*other)) } } -#[cfg(notest)] +#[cfg(not(test))] impl<'self> Equiv<~str> for &'self str { #[inline(always)] fn equiv(&self, other: &~str) -> bool { eq_slice(*self, *other) } @@ -2451,7 +2451,7 @@ pub mod raw { } -#[cfg(notest)] +#[cfg(not(test))] pub mod traits { use ops::Add; use str::append; diff --git a/src/libcore/tuple.rs b/src/libcore/tuple.rs index 6da22657906dd..b29a4e55426df 100644 --- a/src/libcore/tuple.rs +++ b/src/libcore/tuple.rs @@ -14,7 +14,7 @@ use clone::Clone; use kinds::Copy; use vec; -#[cfg(notest)] use cmp::{Eq, Ord}; +#[cfg(not(test))] use cmp::{Eq, Ord}; pub trait CopyableTuple { fn first(&self) -> T; @@ -122,7 +122,7 @@ impl ExtendedTupleOps for (~[A], ~[B]) { } } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for (A,) { #[inline(always)] fn eq(&self, other: &(A,)) -> bool { @@ -138,7 +138,7 @@ impl Eq for (A,) { fn ne(&self, other: &(A,)) -> bool { !(*self).eq(other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for (A,) { #[inline(always)] fn lt(&self, other: &(A,)) -> bool { @@ -161,7 +161,7 @@ impl Ord for (A,) { fn gt(&self, other: &(A,)) -> bool { other.lt(&(*self)) } } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for (A, B) { #[inline(always)] fn eq(&self, other: &(A, B)) -> bool { @@ -177,7 +177,7 @@ impl Eq for (A, B) { fn ne(&self, other: &(A, B)) -> bool { !(*self).eq(other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for (A, B) { #[inline(always)] fn lt(&self, other: &(A, B)) -> bool { @@ -202,7 +202,7 @@ impl Ord for (A, B) { fn gt(&self, other: &(A, B)) -> bool { (*other).lt(&(*self)) } } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for (A, B, C) { #[inline(always)] fn eq(&self, other: &(A, B, C)) -> bool { @@ -219,7 +219,7 @@ impl Eq for (A, B, C) { fn ne(&self, other: &(A, B, C)) -> bool { !(*self).eq(other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for (A, B, C) { #[inline(always)] fn lt(&self, other: &(A, B, C)) -> bool { diff --git a/src/libcore/unstable.rs b/src/libcore/unstable.rs index 4a69de26f6b13..400830c0a6db9 100644 --- a/src/libcore/unstable.rs +++ b/src/libcore/unstable.rs @@ -33,7 +33,7 @@ pub mod intrinsics; #[path = "unstable/extfmt.rs"] pub mod extfmt; #[path = "unstable/lang.rs"] -#[cfg(notest)] +#[cfg(not(test))] pub mod lang; mod rustrt { diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index 947146dee0e74..5e2f0926c980b 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -30,7 +30,7 @@ use uint; use unstable::intrinsics; use vec; -#[cfg(notest)] use cmp::Equiv; +#[cfg(not(test))] use cmp::Equiv; pub mod rustrt { use libc; @@ -1656,7 +1656,7 @@ fn equals(a: &[T], b: &[T]) -> bool { true } -#[cfg(notest)] +#[cfg(not(test))] impl<'self,T:Eq> Eq for &'self [T] { #[inline(always)] fn eq(&self, other: & &'self [T]) -> bool { eq(*self, *other) } @@ -1664,7 +1664,7 @@ impl<'self,T:Eq> Eq for &'self [T] { fn ne(&self, other: & &'self [T]) -> bool { !self.eq(other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for ~[T] { #[inline(always)] fn eq(&self, other: &~[T]) -> bool { eq(*self, *other) } @@ -1672,7 +1672,7 @@ impl Eq for ~[T] { fn ne(&self, other: &~[T]) -> bool { !self.eq(other) } } -#[cfg(notest)] +#[cfg(not(test))] impl Eq for @[T] { #[inline(always)] fn eq(&self, other: &@[T]) -> bool { eq(*self, *other) } @@ -1680,25 +1680,25 @@ impl Eq for @[T] { fn ne(&self, other: &@[T]) -> bool { !self.eq(other) } } -#[cfg(notest)] +#[cfg(not(test))] impl<'self,T:TotalEq> TotalEq for &'self [T] { #[inline(always)] fn equals(&self, other: & &'self [T]) -> bool { equals(*self, *other) } } -#[cfg(notest)] +#[cfg(not(test))] impl TotalEq for ~[T] { #[inline(always)] fn equals(&self, other: &~[T]) -> bool { equals(*self, *other) } } -#[cfg(notest)] +#[cfg(not(test))] impl TotalEq for @[T] { #[inline(always)] fn equals(&self, other: &@[T]) -> bool { equals(*self, *other) } } -#[cfg(notest)] +#[cfg(not(test))] impl<'self,T:Eq> Equiv<~[T]> for &'self [T] { #[inline(always)] fn equiv(&self, other: &~[T]) -> bool { eq(*self, *other) } @@ -1720,19 +1720,19 @@ fn cmp(a: &[T], b: &[T]) -> Ordering { a.len().cmp(&b.len()) } -#[cfg(notest)] +#[cfg(not(test))] impl<'self,T:TotalOrd> TotalOrd for &'self [T] { #[inline(always)] fn cmp(&self, other: & &'self [T]) -> Ordering { cmp(*self, *other) } } -#[cfg(notest)] +#[cfg(not(test))] impl TotalOrd for ~[T] { #[inline(always)] fn cmp(&self, other: &~[T]) -> Ordering { cmp(*self, *other) } } -#[cfg(notest)] +#[cfg(not(test))] impl TotalOrd for @[T] { #[inline(always)] fn cmp(&self, other: &@[T]) -> Ordering { cmp(*self, *other) } @@ -1757,7 +1757,7 @@ fn le(a: &[T], b: &[T]) -> bool { !lt(b, a) } fn ge(a: &[T], b: &[T]) -> bool { !lt(a, b) } fn gt(a: &[T], b: &[T]) -> bool { lt(b, a) } -#[cfg(notest)] +#[cfg(not(test))] impl<'self,T:Ord> Ord for &'self [T] { #[inline(always)] fn lt(&self, other: & &'self [T]) -> bool { lt((*self), (*other)) } @@ -1769,7 +1769,7 @@ impl<'self,T:Ord> Ord for &'self [T] { fn gt(&self, other: & &'self [T]) -> bool { gt((*self), (*other)) } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for ~[T] { #[inline(always)] fn lt(&self, other: &~[T]) -> bool { lt((*self), (*other)) } @@ -1781,7 +1781,7 @@ impl Ord for ~[T] { fn gt(&self, other: &~[T]) -> bool { gt((*self), (*other)) } } -#[cfg(notest)] +#[cfg(not(test))] impl Ord for @[T] { #[inline(always)] fn lt(&self, other: &@[T]) -> bool { lt((*self), (*other)) } @@ -1793,7 +1793,7 @@ impl Ord for @[T] { fn gt(&self, other: &@[T]) -> bool { gt((*self), (*other)) } } -#[cfg(notest)] +#[cfg(not(test))] pub mod traits { use kinds::Copy; use ops::Add; diff --git a/src/librustc/driver/driver.rs b/src/librustc/driver/driver.rs index 5e8dab0f77287..43d90095424ef 100644 --- a/src/librustc/driver/driver.rs +++ b/src/librustc/driver/driver.rs @@ -119,9 +119,8 @@ pub fn build_configuration(sess: Session, argv0: @~str, input: &input) -> let default_cfg = default_configuration(sess, argv0, input); let user_cfg = /*bad*/copy sess.opts.cfg; // If the user wants a test runner, then add the test cfg - let user_cfg = append_configuration( - user_cfg, - if sess.opts.test { ~"test" } else { ~"notest" }); + let user_cfg = if sess.opts.test { append_configuration(user_cfg, ~"test") } + else { user_cfg }; // If the user requested GC, then add the GC cfg let user_cfg = append_configuration( user_cfg,