1
Fork 0

Remove #[cfg(notest)] and use #[cfg(not(test))] to cooincide with #[cfg(debug)]

This commit is contained in:
Zack Corr 2013-05-08 21:11:23 +10:00
parent e6529c36af
commit cb66d8948a
20 changed files with 131 additions and 132 deletions

View file

@ -166,7 +166,7 @@ pub fn from_slice<T:Copy>(v: &[T]) -> @[T] {
from_fn(v.len(), |i| v[i]) from_fn(v.len(), |i| v[i])
} }
#[cfg(notest)] #[cfg(not(test))]
pub mod traits { pub mod traits {
use at_vec::append; use at_vec::append;
use kinds::Copy; use kinds::Copy;

View file

@ -10,7 +10,7 @@
//! Boolean logic //! Boolean logic
#[cfg(notest)] #[cfg(not(test))]
use cmp::{Eq, Ord, TotalOrd, Ordering}; use cmp::{Eq, Ord, TotalOrd, Ordering};
use option::{None, Option, Some}; use option::{None, Option, Some};
use from_str::FromStr; use from_str::FromStr;
@ -75,7 +75,7 @@ pub fn all_values(blk: &fn(v: bool)) {
#[inline(always)] #[inline(always)]
pub fn to_bit(v: bool) -> u8 { if v { 1u8 } else { 0u8 } } pub fn to_bit(v: bool) -> u8 { if v { 1u8 } else { 0u8 } }
#[cfg(notest)] #[cfg(not(test))]
impl Ord for bool { impl Ord for bool {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &bool) -> bool { to_bit(*self) < to_bit(*other) } 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) } fn ge(&self, other: &bool) -> bool { to_bit(*self) >= to_bit(*other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl TotalOrd for bool { impl TotalOrd for bool {
#[inline(always)] #[inline(always)]
fn cmp(&self, other: &bool) -> Ordering { to_bit(*self).cmp(&to_bit(*other)) } fn cmp(&self, other: &bool) -> Ordering { to_bit(*self).cmp(&to_bit(*other)) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Eq for bool { impl Eq for bool {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &bool) -> bool { (*self) == (*other) } fn eq(&self, other: &bool) -> bool { (*self) == (*other) }

View file

@ -10,7 +10,7 @@
//! Utilities for manipulating the char type //! Utilities for manipulating the char type
#[cfg(notest)] #[cfg(not(test))]
use cmp::Ord; use cmp::Ord;
use option::{None, Option, Some}; use option::{None, Option, Some};
use str; use str;
@ -18,7 +18,7 @@ use u32;
use uint; use uint;
use unicode::{derived_property, general_category}; use unicode::{derived_property, general_category};
#[cfg(notest)] use cmp::Eq; #[cfg(not(test))] use cmp::Eq;
/* /*
Lu Uppercase_Letter an uppercase letter Lu Uppercase_Letter an uppercase letter
@ -244,7 +244,7 @@ pub fn len_utf8_bytes(c: char) -> uint {
else { fail!(~"invalid character!") } else { fail!(~"invalid character!") }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Eq for char { impl Eq for char {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &char) -> bool { (*self) == (*other) } fn eq(&self, other: &char) -> bool { (*self) == (*other) }
@ -252,7 +252,7 @@ impl Eq for char {
fn ne(&self, other: &char) -> bool { (*self) != (*other) } fn ne(&self, other: &char) -> bool { (*self) != (*other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Ord for char { impl Ord for char {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &char) -> bool { *self < *other } fn lt(&self, other: &char) -> bool { *self < *other }

View file

@ -15,9 +15,9 @@ use ptr::mut_null;
use repr::BoxRepr; use repr::BoxRepr;
use sys::TypeDesc; use sys::TypeDesc;
use cast::transmute; 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 * Runtime structures
@ -164,7 +164,7 @@ fn debug_mem() -> bool {
} }
/// Destroys all managed memory (i.e. @ boxes) held by the current task. /// Destroys all managed memory (i.e. @ boxes) held by the current task.
#[cfg(notest)] #[cfg(not(test))]
#[lang="annihilate"] #[lang="annihilate"]
pub unsafe fn annihilate() { pub unsafe fn annihilate() {
use unstable::lang::local_free; use unstable::lang::local_free;

View file

@ -179,9 +179,9 @@ pub mod managed;
/* Core language traits */ /* Core language traits */
#[cfg(notest)] pub mod kinds; #[cfg(not(test))] pub mod kinds;
#[cfg(notest)] pub mod ops; #[cfg(not(test))] pub mod ops;
#[cfg(notest)] pub mod cmp; #[cfg(not(test))] pub mod cmp;
/* Common traits */ /* Common traits */

View file

@ -42,7 +42,7 @@ pub fn console_off() {
} }
} }
#[cfg(notest)] #[cfg(not(test))]
#[lang="log_type"] #[lang="log_type"]
pub fn log_type<T>(level: u32, object: &T) { pub fn log_type<T>(level: u32, object: &T) {
use cast::transmute; use cast::transmute;

View file

@ -12,7 +12,7 @@
use ptr::to_unsafe_ptr; use ptr::to_unsafe_ptr;
#[cfg(notest)] use cmp::{Eq, Ord}; #[cfg(not(test))] use cmp::{Eq, Ord};
pub mod raw { pub mod raw {
use intrinsic::TyDesc; use intrinsic::TyDesc;
@ -49,7 +49,7 @@ pub fn mut_ptr_eq<T>(a: @mut T, b: @mut T) -> bool {
a_ptr == b_ptr a_ptr == b_ptr
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T:Eq> Eq for @T { impl<T:Eq> Eq for @T {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &@T) -> bool { *(*self) == *(*other) } fn eq(&self, other: &@T) -> bool { *(*self) == *(*other) }
@ -57,7 +57,7 @@ impl<T:Eq> Eq for @T {
fn ne(&self, other: &@T) -> bool { *(*self) != *(*other) } fn ne(&self, other: &@T) -> bool { *(*self) != *(*other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T:Eq> Eq for @mut T { impl<T:Eq> Eq for @mut T {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &@mut T) -> bool { *(*self) == *(*other) } fn eq(&self, other: &@mut T) -> bool { *(*self) == *(*other) }
@ -65,7 +65,7 @@ impl<T:Eq> Eq for @mut T {
fn ne(&self, other: &@mut T) -> bool { *(*self) != *(*other) } fn ne(&self, other: &@mut T) -> bool { *(*self) != *(*other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T:Ord> Ord for @T { impl<T:Ord> Ord for @T {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &@T) -> bool { *(*self) < *(*other) } fn lt(&self, other: &@T) -> bool { *(*self) < *(*other) }
@ -77,7 +77,7 @@ impl<T:Ord> Ord for @T {
fn gt(&self, other: &@T) -> bool { *(*self) > *(*other) } fn gt(&self, other: &@T) -> bool { *(*self) > *(*other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T:Ord> Ord for @mut T { impl<T:Ord> Ord for @mut T {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &@mut T) -> bool { *(*self) < *(*other) } fn lt(&self, other: &@mut T) -> bool { *(*self) < *(*other) }

View file

@ -14,10 +14,10 @@ Functions for the unit type.
*/ */
#[cfg(notest)] #[cfg(not(test))]
use prelude::*; use prelude::*;
#[cfg(notest)] #[cfg(not(test))]
impl Eq for () { impl Eq for () {
#[inline(always)] #[inline(always)]
fn eq(&self, _other: &()) -> bool { true } fn eq(&self, _other: &()) -> bool { true }
@ -25,7 +25,7 @@ impl Eq for () {
fn ne(&self, _other: &()) -> bool { false } fn ne(&self, _other: &()) -> bool { false }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Ord for () { impl Ord for () {
#[inline(always)] #[inline(always)]
fn lt(&self, _other: &()) -> bool { false } fn lt(&self, _other: &()) -> bool { false }
@ -37,13 +37,13 @@ impl Ord for () {
fn gt(&self, _other: &()) -> bool { false } fn gt(&self, _other: &()) -> bool { false }
} }
#[cfg(notest)] #[cfg(not(test))]
impl TotalOrd for () { impl TotalOrd for () {
#[inline(always)] #[inline(always)]
fn cmp(&self, _other: &()) -> Ordering { Equal } fn cmp(&self, _other: &()) -> Ordering { Equal }
} }
#[cfg(notest)] #[cfg(not(test))]
impl TotalEq for () { impl TotalEq for () {
#[inline(always)] #[inline(always)]
fn equals(&self, _other: &()) -> bool { true } fn equals(&self, _other: &()) -> bool { true }

View file

@ -198,7 +198,7 @@ pub mod consts {
impl Num for f32 {} impl Num for f32 {}
#[cfg(notest)] #[cfg(not(test))]
impl Eq for f32 { impl Eq for f32 {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &f32) -> bool { (*self) == (*other) } fn eq(&self, other: &f32) -> bool { (*self) == (*other) }
@ -206,7 +206,7 @@ impl Eq for f32 {
fn ne(&self, other: &f32) -> bool { (*self) != (*other) } fn ne(&self, other: &f32) -> bool { (*self) != (*other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl ApproxEq<f32> for f32 { impl ApproxEq<f32> for f32 {
#[inline(always)] #[inline(always)]
fn approx_epsilon() -> f32 { 1.0e-6 } fn approx_epsilon() -> f32 { 1.0e-6 }
@ -222,7 +222,7 @@ impl ApproxEq<f32> for f32 {
} }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Ord for f32 { impl Ord for f32 {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &f32) -> bool { (*self) < (*other) } fn lt(&self, other: &f32) -> bool { (*self) < (*other) }
@ -272,37 +272,37 @@ impl One for f32 {
fn one() -> f32 { 1.0 } fn one() -> f32 { 1.0 }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Add<f32,f32> for f32 { impl Add<f32,f32> for f32 {
#[inline(always)] #[inline(always)]
fn add(&self, other: &f32) -> f32 { *self + *other } fn add(&self, other: &f32) -> f32 { *self + *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Sub<f32,f32> for f32 { impl Sub<f32,f32> for f32 {
#[inline(always)] #[inline(always)]
fn sub(&self, other: &f32) -> f32 { *self - *other } fn sub(&self, other: &f32) -> f32 { *self - *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Mul<f32,f32> for f32 { impl Mul<f32,f32> for f32 {
#[inline(always)] #[inline(always)]
fn mul(&self, other: &f32) -> f32 { *self * *other } fn mul(&self, other: &f32) -> f32 { *self * *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Div<f32,f32> for f32 { impl Div<f32,f32> for f32 {
#[inline(always)] #[inline(always)]
fn div(&self, other: &f32) -> f32 { *self / *other } fn div(&self, other: &f32) -> f32 { *self / *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Rem<f32,f32> for f32 { impl Rem<f32,f32> for f32 {
#[inline(always)] #[inline(always)]
fn rem(&self, other: &f32) -> f32 { *self % *other } fn rem(&self, other: &f32) -> f32 { *self % *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Neg<f32> for f32 { impl Neg<f32> for f32 {
#[inline(always)] #[inline(always)]
fn neg(&self) -> f32 { -*self } fn neg(&self) -> f32 { -*self }

View file

@ -221,7 +221,7 @@ pub mod consts {
impl Num for f64 {} impl Num for f64 {}
#[cfg(notest)] #[cfg(not(test))]
impl Eq for f64 { impl Eq for f64 {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &f64) -> bool { (*self) == (*other) } fn eq(&self, other: &f64) -> bool { (*self) == (*other) }
@ -229,7 +229,7 @@ impl Eq for f64 {
fn ne(&self, other: &f64) -> bool { (*self) != (*other) } fn ne(&self, other: &f64) -> bool { (*self) != (*other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl ApproxEq<f64> for f64 { impl ApproxEq<f64> for f64 {
#[inline(always)] #[inline(always)]
fn approx_epsilon() -> f64 { 1.0e-6 } fn approx_epsilon() -> f64 { 1.0e-6 }
@ -245,7 +245,7 @@ impl ApproxEq<f64> for f64 {
} }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Ord for f64 { impl Ord for f64 {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &f64) -> bool { (*self) < (*other) } fn lt(&self, other: &f64) -> bool { (*self) < (*other) }
@ -295,28 +295,28 @@ impl One for f64 {
fn one() -> f64 { 1.0 } fn one() -> f64 { 1.0 }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Add<f64,f64> for f64 { impl Add<f64,f64> for f64 {
fn add(&self, other: &f64) -> f64 { *self + *other } fn add(&self, other: &f64) -> f64 { *self + *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Sub<f64,f64> for f64 { impl Sub<f64,f64> for f64 {
fn sub(&self, other: &f64) -> f64 { *self - *other } fn sub(&self, other: &f64) -> f64 { *self - *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Mul<f64,f64> for f64 { impl Mul<f64,f64> for f64 {
fn mul(&self, other: &f64) -> f64 { *self * *other } fn mul(&self, other: &f64) -> f64 { *self * *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Div<f64,f64> for f64 { impl Div<f64,f64> for f64 {
fn div(&self, other: &f64) -> f64 { *self / *other } fn div(&self, other: &f64) -> f64 { *self / *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Rem<f64,f64> for f64 { impl Rem<f64,f64> for f64 {
#[inline(always)] #[inline(always)]
fn rem(&self, other: &f64) -> f64 { *self % *other } fn rem(&self, other: &f64) -> f64 { *self % *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Neg<f64> for f64 { impl Neg<f64> for f64 {
fn neg(&self) -> f64 { -*self } fn neg(&self) -> f64 { -*self }
} }

View file

@ -363,7 +363,7 @@ pub fn tan(x: float) -> float {
impl Num for float {} impl Num for float {}
#[cfg(notest)] #[cfg(not(test))]
impl Eq for float { impl Eq for float {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &float) -> bool { (*self) == (*other) } fn eq(&self, other: &float) -> bool { (*self) == (*other) }
@ -371,7 +371,7 @@ impl Eq for float {
fn ne(&self, other: &float) -> bool { (*self) != (*other) } fn ne(&self, other: &float) -> bool { (*self) != (*other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl ApproxEq<float> for float { impl ApproxEq<float> for float {
#[inline(always)] #[inline(always)]
fn approx_epsilon() -> float { 1.0e-6 } fn approx_epsilon() -> float { 1.0e-6 }
@ -387,7 +387,7 @@ impl ApproxEq<float> for float {
} }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Ord for float { impl Ord for float {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &float) -> bool { (*self) < (*other) } 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 } fn yn(&self, n: int) -> float { yn(n as c_int, *self as f64) as float }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Add<float,float> for float { impl Add<float,float> for float {
#[inline(always)] #[inline(always)]
fn add(&self, other: &float) -> float { *self + *other } fn add(&self, other: &float) -> float { *self + *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Sub<float,float> for float { impl Sub<float,float> for float {
#[inline(always)] #[inline(always)]
fn sub(&self, other: &float) -> float { *self - *other } fn sub(&self, other: &float) -> float { *self - *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Mul<float,float> for float { impl Mul<float,float> for float {
#[inline(always)] #[inline(always)]
fn mul(&self, other: &float) -> float { *self * *other } fn mul(&self, other: &float) -> float { *self * *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Div<float,float> for float { impl Div<float,float> for float {
#[inline(always)] #[inline(always)]
fn div(&self, other: &float) -> float { *self / *other } fn div(&self, other: &float) -> float { *self / *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Rem<float,float> for float { impl Rem<float,float> for float {
#[inline(always)] #[inline(always)]
fn rem(&self, other: &float) -> float { *self % *other } fn rem(&self, other: &float) -> float { *self % *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Neg<float> for float { impl Neg<float> for float {
#[inline(always)] #[inline(always)]
fn neg(&self) -> float { -*self } fn neg(&self) -> float { -*self }

View file

@ -131,7 +131,7 @@ pub fn abs(i: T) -> T { i.abs() }
impl Num for T {} impl Num for T {}
#[cfg(notest)] #[cfg(not(test))]
impl Ord for T { impl Ord for T {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &T) -> bool { return (*self) < (*other); } 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); } fn gt(&self, other: &T) -> bool { return (*self) > (*other); }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Eq for T { impl Eq for T {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &T) -> bool { return (*self) == (*other); } fn eq(&self, other: &T) -> bool { return (*self) == (*other); }
@ -182,25 +182,25 @@ impl One for T {
fn one() -> T { 1 } fn one() -> T { 1 }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Add<T,T> for T { impl Add<T,T> for T {
#[inline(always)] #[inline(always)]
fn add(&self, other: &T) -> T { *self + *other } fn add(&self, other: &T) -> T { *self + *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Sub<T,T> for T { impl Sub<T,T> for T {
#[inline(always)] #[inline(always)]
fn sub(&self, other: &T) -> T { *self - *other } fn sub(&self, other: &T) -> T { *self - *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Mul<T,T> for T { impl Mul<T,T> for T {
#[inline(always)] #[inline(always)]
fn mul(&self, other: &T) -> T { *self * *other } fn mul(&self, other: &T) -> T { *self * *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Div<T,T> for T { impl Div<T,T> for T {
/// ///
/// Integer division, truncated towards 0. As this behaviour reflects the underlying /// Integer division, truncated towards 0. As this behaviour reflects the underlying
@ -224,7 +224,7 @@ impl Div<T,T> for T {
fn div(&self, other: &T) -> T { *self / *other } fn div(&self, other: &T) -> T { *self / *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Rem<T,T> for T { impl Rem<T,T> for T {
/// ///
/// Returns the integer remainder after division, satisfying: /// Returns the integer remainder after division, satisfying:
@ -251,7 +251,7 @@ impl Rem<T,T> for T {
fn rem(&self, other: &T) -> T { *self % *other } fn rem(&self, other: &T) -> T { *self % *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Neg<T> for T { impl Neg<T> for T {
#[inline(always)] #[inline(always)]
fn neg(&self) -> T { -*self } fn neg(&self) -> T { -*self }
@ -417,37 +417,37 @@ impl Integer for T {
impl Bitwise for T {} impl Bitwise for T {}
#[cfg(notest)] #[cfg(not(test))]
impl BitOr<T,T> for T { impl BitOr<T,T> for T {
#[inline(always)] #[inline(always)]
fn bitor(&self, other: &T) -> T { *self | *other } fn bitor(&self, other: &T) -> T { *self | *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl BitAnd<T,T> for T { impl BitAnd<T,T> for T {
#[inline(always)] #[inline(always)]
fn bitand(&self, other: &T) -> T { *self & *other } fn bitand(&self, other: &T) -> T { *self & *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl BitXor<T,T> for T { impl BitXor<T,T> for T {
#[inline(always)] #[inline(always)]
fn bitxor(&self, other: &T) -> T { *self ^ *other } fn bitxor(&self, other: &T) -> T { *self ^ *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Shl<T,T> for T { impl Shl<T,T> for T {
#[inline(always)] #[inline(always)]
fn shl(&self, other: &T) -> T { *self << *other } fn shl(&self, other: &T) -> T { *self << *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Shr<T,T> for T { impl Shr<T,T> for T {
#[inline(always)] #[inline(always)]
fn shr(&self, other: &T) -> T { *self >> *other } fn shr(&self, other: &T) -> T { *self >> *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Not<T> for T { impl Not<T> for T {
#[inline(always)] #[inline(always)]
fn not(&self) -> T { !*self } fn not(&self) -> T { !*self }

View file

@ -96,7 +96,7 @@ pub fn compl(i: T) -> T {
impl Num for T {} impl Num for T {}
#[cfg(notest)] #[cfg(not(test))]
impl Ord for T { impl Ord for T {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &T) -> bool { (*self) < (*other) } fn lt(&self, other: &T) -> bool { (*self) < (*other) }
@ -108,7 +108,7 @@ impl Ord for T {
fn gt(&self, other: &T) -> bool { (*self) > (*other) } fn gt(&self, other: &T) -> bool { (*self) > (*other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Eq for T { impl Eq for T {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &T) -> bool { return (*self) == (*other); } fn eq(&self, other: &T) -> bool { return (*self) == (*other); }
@ -147,37 +147,37 @@ impl One for T {
fn one() -> T { 1 } fn one() -> T { 1 }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Add<T,T> for T { impl Add<T,T> for T {
#[inline(always)] #[inline(always)]
fn add(&self, other: &T) -> T { *self + *other } fn add(&self, other: &T) -> T { *self + *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Sub<T,T> for T { impl Sub<T,T> for T {
#[inline(always)] #[inline(always)]
fn sub(&self, other: &T) -> T { *self - *other } fn sub(&self, other: &T) -> T { *self - *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Mul<T,T> for T { impl Mul<T,T> for T {
#[inline(always)] #[inline(always)]
fn mul(&self, other: &T) -> T { *self * *other } fn mul(&self, other: &T) -> T { *self * *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Div<T,T> for T { impl Div<T,T> for T {
#[inline(always)] #[inline(always)]
fn div(&self, other: &T) -> T { *self / *other } fn div(&self, other: &T) -> T { *self / *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Rem<T,T> for T { impl Rem<T,T> for T {
#[inline(always)] #[inline(always)]
fn rem(&self, other: &T) -> T { *self % *other } fn rem(&self, other: &T) -> T { *self % *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Neg<T> for T { impl Neg<T> for T {
#[inline(always)] #[inline(always)]
fn neg(&self) -> T { -*self } fn neg(&self) -> T { -*self }
@ -240,37 +240,37 @@ impl Integer for T {
impl Bitwise for T {} impl Bitwise for T {}
#[cfg(notest)] #[cfg(not(test))]
impl BitOr<T,T> for T { impl BitOr<T,T> for T {
#[inline(always)] #[inline(always)]
fn bitor(&self, other: &T) -> T { *self | *other } fn bitor(&self, other: &T) -> T { *self | *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl BitAnd<T,T> for T { impl BitAnd<T,T> for T {
#[inline(always)] #[inline(always)]
fn bitand(&self, other: &T) -> T { *self & *other } fn bitand(&self, other: &T) -> T { *self & *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl BitXor<T,T> for T { impl BitXor<T,T> for T {
#[inline(always)] #[inline(always)]
fn bitxor(&self, other: &T) -> T { *self ^ *other } fn bitxor(&self, other: &T) -> T { *self ^ *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Shl<T,T> for T { impl Shl<T,T> for T {
#[inline(always)] #[inline(always)]
fn shl(&self, other: &T) -> T { *self << *other } fn shl(&self, other: &T) -> T { *self << *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Shr<T,T> for T { impl Shr<T,T> for T {
#[inline(always)] #[inline(always)]
fn shr(&self, other: &T) -> T { *self >> *other } fn shr(&self, other: &T) -> T { *self >> *other }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Not<T> for T { impl Not<T> for T {
#[inline(always)] #[inline(always)]
fn not(&self) -> T { !*self } fn not(&self) -> T { !*self }

View file

@ -10,9 +10,9 @@
//! Operations on unique pointer types //! Operations on unique pointer types
#[cfg(notest)] use cmp::{Eq, Ord}; #[cfg(not(test))] use cmp::{Eq, Ord};
#[cfg(notest)] #[cfg(not(test))]
impl<T:Eq> Eq for ~T { impl<T:Eq> Eq for ~T {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &~T) -> bool { *(*self) == *(*other) } fn eq(&self, other: &~T) -> bool { *(*self) == *(*other) }
@ -20,7 +20,7 @@ impl<T:Eq> Eq for ~T {
fn ne(&self, other: &~T) -> bool { *(*self) != *(*other) } fn ne(&self, other: &~T) -> bool { *(*self) != *(*other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T:Ord> Ord for ~T { impl<T:Ord> Ord for ~T {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &~T) -> bool { *(*self) < *(*other) } fn lt(&self, other: &~T) -> bool { *(*self) < *(*other) }

View file

@ -15,7 +15,7 @@ use libc;
use libc::{c_void, size_t}; use libc::{c_void, size_t};
use sys; use sys;
#[cfg(notest)] use cmp::{Eq, Ord}; #[cfg(not(test))] use cmp::{Eq, Ord};
use uint; use uint;
pub mod libc_ { pub mod libc_ {
@ -243,7 +243,7 @@ impl<T> Ptr<T> for *mut T {
} }
// Equality for pointers // Equality for pointers
#[cfg(notest)] #[cfg(not(test))]
impl<T> Eq for *const T { impl<T> Eq for *const T {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &*const T) -> bool { fn eq(&self, other: &*const T) -> bool {
@ -258,7 +258,7 @@ impl<T> Eq for *const T {
} }
// Comparison for pointers // Comparison for pointers
#[cfg(notest)] #[cfg(not(test))]
impl<T> Ord for *const T { impl<T> Ord for *const T {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &*const T) -> bool { fn lt(&self, other: &*const T) -> bool {
@ -295,7 +295,7 @@ impl<T> Ord for *const T {
} }
// Equality for region pointers // Equality for region pointers
#[cfg(notest)] #[cfg(not(test))]
impl<'self,T:Eq> Eq for &'self T { impl<'self,T:Eq> Eq for &'self T {
#[inline(always)] #[inline(always)]
fn eq(&self, other: & &'self T) -> bool { fn eq(&self, other: & &'self T) -> bool {
@ -308,7 +308,7 @@ impl<'self,T:Eq> Eq for &'self T {
} }
// Comparison for region pointers // Comparison for region pointers
#[cfg(notest)] #[cfg(not(test))]
impl<'self,T:Ord> Ord for &'self T { impl<'self,T:Ord> Ord for &'self T {
#[inline(always)] #[inline(always)]
fn lt(&self, other: & &'self T) -> bool { fn lt(&self, other: & &'self T) -> bool {

View file

@ -32,7 +32,7 @@ use uint;
use vec; use vec;
use to_str::ToStr; 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 Section: Creating a string
@ -913,7 +913,7 @@ Section: Comparing strings
*/ */
/// Bytewise slice equality /// Bytewise slice equality
#[cfg(notest)] #[cfg(not(test))]
#[lang="str_eq"] #[lang="str_eq"]
#[inline] #[inline]
pub fn eq_slice(a: &str, b: &str) -> bool { 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 /// Bytewise string equality
#[cfg(notest)] #[cfg(not(test))]
#[lang="uniq_str_eq"] #[lang="uniq_str_eq"]
#[inline] #[inline]
pub fn eq(a: &~str, b: &~str) -> bool { pub fn eq(a: &~str, b: &~str) -> bool {
@ -977,19 +977,19 @@ fn cmp(a: &str, b: &str) -> Ordering {
a.len().cmp(&b.len()) a.len().cmp(&b.len())
} }
#[cfg(notest)] #[cfg(not(test))]
impl<'self> TotalOrd for &'self str { impl<'self> TotalOrd for &'self str {
#[inline] #[inline]
fn cmp(&self, other: & &'self str) -> Ordering { cmp(*self, *other) } fn cmp(&self, other: & &'self str) -> Ordering { cmp(*self, *other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl TotalOrd for ~str { impl TotalOrd for ~str {
#[inline] #[inline]
fn cmp(&self, other: &~str) -> Ordering { cmp(*self, *other) } fn cmp(&self, other: &~str) -> Ordering { cmp(*self, *other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl TotalOrd for @str { impl TotalOrd for @str {
#[inline] #[inline]
fn cmp(&self, other: &@str) -> Ordering { cmp(*self, *other) } fn cmp(&self, other: &@str) -> Ordering { cmp(*self, *other) }
@ -1030,7 +1030,7 @@ fn gt(a: &str, b: &str) -> bool {
!le(a, b) !le(a, b)
} }
#[cfg(notest)] #[cfg(not(test))]
impl<'self> Eq for &'self str { impl<'self> Eq for &'self str {
#[inline(always)] #[inline(always)]
fn eq(&self, other: & &'self str) -> bool { 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) } fn ne(&self, other: & &'self str) -> bool { !(*self).eq(other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Eq for ~str { impl Eq for ~str {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &~str) -> bool { fn eq(&self, other: &~str) -> bool {
@ -1050,7 +1050,7 @@ impl Eq for ~str {
fn ne(&self, other: &~str) -> bool { !(*self).eq(other) } fn ne(&self, other: &~str) -> bool { !(*self).eq(other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Eq for @str { impl Eq for @str {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &@str) -> bool { fn eq(&self, other: &@str) -> bool {
@ -1060,7 +1060,7 @@ impl Eq for @str {
fn ne(&self, other: &@str) -> bool { !(*self).eq(other) } fn ne(&self, other: &@str) -> bool { !(*self).eq(other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<'self> TotalEq for &'self str { impl<'self> TotalEq for &'self str {
#[inline(always)] #[inline(always)]
fn equals(&self, other: & &'self str) -> bool { 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 { impl TotalEq for ~str {
#[inline(always)] #[inline(always)]
fn equals(&self, other: &~str) -> bool { fn equals(&self, other: &~str) -> bool {
@ -1076,7 +1076,7 @@ impl TotalEq for ~str {
} }
} }
#[cfg(notest)] #[cfg(not(test))]
impl TotalEq for @str { impl TotalEq for @str {
#[inline(always)] #[inline(always)]
fn equals(&self, other: &@str) -> bool { fn equals(&self, other: &@str) -> bool {
@ -1084,7 +1084,7 @@ impl TotalEq for @str {
} }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Ord for ~str { impl Ord for ~str {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &~str) -> bool { lt((*self), (*other)) } 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)) } fn gt(&self, other: &~str) -> bool { gt((*self), (*other)) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<'self> Ord for &'self str { impl<'self> Ord for &'self str {
#[inline(always)] #[inline(always)]
fn lt(&self, other: & &'self str) -> bool { lt((*self), (*other)) } 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)) } fn gt(&self, other: & &'self str) -> bool { gt((*self), (*other)) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl Ord for @str { impl Ord for @str {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &@str) -> bool { lt((*self), (*other)) } 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)) } fn gt(&self, other: &@str) -> bool { gt((*self), (*other)) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<'self> Equiv<~str> for &'self str { impl<'self> Equiv<~str> for &'self str {
#[inline(always)] #[inline(always)]
fn equiv(&self, other: &~str) -> bool { eq_slice(*self, *other) } 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 { pub mod traits {
use ops::Add; use ops::Add;
use str::append; use str::append;

View file

@ -14,7 +14,7 @@ use clone::Clone;
use kinds::Copy; use kinds::Copy;
use vec; use vec;
#[cfg(notest)] use cmp::{Eq, Ord}; #[cfg(not(test))] use cmp::{Eq, Ord};
pub trait CopyableTuple<T, U> { pub trait CopyableTuple<T, U> {
fn first(&self) -> T; fn first(&self) -> T;
@ -122,7 +122,7 @@ impl<A:Copy,B:Copy> ExtendedTupleOps<A,B> for (~[A], ~[B]) {
} }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<A:Eq> Eq for (A,) { impl<A:Eq> Eq for (A,) {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &(A,)) -> bool { fn eq(&self, other: &(A,)) -> bool {
@ -138,7 +138,7 @@ impl<A:Eq> Eq for (A,) {
fn ne(&self, other: &(A,)) -> bool { !(*self).eq(other) } fn ne(&self, other: &(A,)) -> bool { !(*self).eq(other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<A:Ord> Ord for (A,) { impl<A:Ord> Ord for (A,) {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &(A,)) -> bool { fn lt(&self, other: &(A,)) -> bool {
@ -161,7 +161,7 @@ impl<A:Ord> Ord for (A,) {
fn gt(&self, other: &(A,)) -> bool { other.lt(&(*self)) } fn gt(&self, other: &(A,)) -> bool { other.lt(&(*self)) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<A:Eq,B:Eq> Eq for (A, B) { impl<A:Eq,B:Eq> Eq for (A, B) {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &(A, B)) -> bool { fn eq(&self, other: &(A, B)) -> bool {
@ -177,7 +177,7 @@ impl<A:Eq,B:Eq> Eq for (A, B) {
fn ne(&self, other: &(A, B)) -> bool { !(*self).eq(other) } fn ne(&self, other: &(A, B)) -> bool { !(*self).eq(other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<A:Ord,B:Ord> Ord for (A, B) { impl<A:Ord,B:Ord> Ord for (A, B) {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &(A, B)) -> bool { fn lt(&self, other: &(A, B)) -> bool {
@ -202,7 +202,7 @@ impl<A:Ord,B:Ord> Ord for (A, B) {
fn gt(&self, other: &(A, B)) -> bool { (*other).lt(&(*self)) } fn gt(&self, other: &(A, B)) -> bool { (*other).lt(&(*self)) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<A:Eq,B:Eq,C:Eq> Eq for (A, B, C) { impl<A:Eq,B:Eq,C:Eq> Eq for (A, B, C) {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &(A, B, C)) -> bool { fn eq(&self, other: &(A, B, C)) -> bool {
@ -219,7 +219,7 @@ impl<A:Eq,B:Eq,C:Eq> Eq for (A, B, C) {
fn ne(&self, other: &(A, B, C)) -> bool { !(*self).eq(other) } fn ne(&self, other: &(A, B, C)) -> bool { !(*self).eq(other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<A:Ord,B:Ord,C:Ord> Ord for (A, B, C) { impl<A:Ord,B:Ord,C:Ord> Ord for (A, B, C) {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &(A, B, C)) -> bool { fn lt(&self, other: &(A, B, C)) -> bool {

View file

@ -33,7 +33,7 @@ pub mod intrinsics;
#[path = "unstable/extfmt.rs"] #[path = "unstable/extfmt.rs"]
pub mod extfmt; pub mod extfmt;
#[path = "unstable/lang.rs"] #[path = "unstable/lang.rs"]
#[cfg(notest)] #[cfg(not(test))]
pub mod lang; pub mod lang;
mod rustrt { mod rustrt {

View file

@ -30,7 +30,7 @@ use uint;
use unstable::intrinsics; use unstable::intrinsics;
use vec; use vec;
#[cfg(notest)] use cmp::Equiv; #[cfg(not(test))] use cmp::Equiv;
pub mod rustrt { pub mod rustrt {
use libc; use libc;
@ -1656,7 +1656,7 @@ fn equals<T: TotalEq>(a: &[T], b: &[T]) -> bool {
true true
} }
#[cfg(notest)] #[cfg(not(test))]
impl<'self,T:Eq> Eq for &'self [T] { impl<'self,T:Eq> Eq for &'self [T] {
#[inline(always)] #[inline(always)]
fn eq(&self, other: & &'self [T]) -> bool { eq(*self, *other) } 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) } fn ne(&self, other: & &'self [T]) -> bool { !self.eq(other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T:Eq> Eq for ~[T] { impl<T:Eq> Eq for ~[T] {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &~[T]) -> bool { eq(*self, *other) } fn eq(&self, other: &~[T]) -> bool { eq(*self, *other) }
@ -1672,7 +1672,7 @@ impl<T:Eq> Eq for ~[T] {
fn ne(&self, other: &~[T]) -> bool { !self.eq(other) } fn ne(&self, other: &~[T]) -> bool { !self.eq(other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T:Eq> Eq for @[T] { impl<T:Eq> Eq for @[T] {
#[inline(always)] #[inline(always)]
fn eq(&self, other: &@[T]) -> bool { eq(*self, *other) } fn eq(&self, other: &@[T]) -> bool { eq(*self, *other) }
@ -1680,25 +1680,25 @@ impl<T:Eq> Eq for @[T] {
fn ne(&self, other: &@[T]) -> bool { !self.eq(other) } fn ne(&self, other: &@[T]) -> bool { !self.eq(other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<'self,T:TotalEq> TotalEq for &'self [T] { impl<'self,T:TotalEq> TotalEq for &'self [T] {
#[inline(always)] #[inline(always)]
fn equals(&self, other: & &'self [T]) -> bool { equals(*self, *other) } fn equals(&self, other: & &'self [T]) -> bool { equals(*self, *other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T:TotalEq> TotalEq for ~[T] { impl<T:TotalEq> TotalEq for ~[T] {
#[inline(always)] #[inline(always)]
fn equals(&self, other: &~[T]) -> bool { equals(*self, *other) } fn equals(&self, other: &~[T]) -> bool { equals(*self, *other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T:TotalEq> TotalEq for @[T] { impl<T:TotalEq> TotalEq for @[T] {
#[inline(always)] #[inline(always)]
fn equals(&self, other: &@[T]) -> bool { equals(*self, *other) } fn equals(&self, other: &@[T]) -> bool { equals(*self, *other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<'self,T:Eq> Equiv<~[T]> for &'self [T] { impl<'self,T:Eq> Equiv<~[T]> for &'self [T] {
#[inline(always)] #[inline(always)]
fn equiv(&self, other: &~[T]) -> bool { eq(*self, *other) } fn equiv(&self, other: &~[T]) -> bool { eq(*self, *other) }
@ -1720,19 +1720,19 @@ fn cmp<T: TotalOrd>(a: &[T], b: &[T]) -> Ordering {
a.len().cmp(&b.len()) a.len().cmp(&b.len())
} }
#[cfg(notest)] #[cfg(not(test))]
impl<'self,T:TotalOrd> TotalOrd for &'self [T] { impl<'self,T:TotalOrd> TotalOrd for &'self [T] {
#[inline(always)] #[inline(always)]
fn cmp(&self, other: & &'self [T]) -> Ordering { cmp(*self, *other) } fn cmp(&self, other: & &'self [T]) -> Ordering { cmp(*self, *other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T: TotalOrd> TotalOrd for ~[T] { impl<T: TotalOrd> TotalOrd for ~[T] {
#[inline(always)] #[inline(always)]
fn cmp(&self, other: &~[T]) -> Ordering { cmp(*self, *other) } fn cmp(&self, other: &~[T]) -> Ordering { cmp(*self, *other) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T: TotalOrd> TotalOrd for @[T] { impl<T: TotalOrd> TotalOrd for @[T] {
#[inline(always)] #[inline(always)]
fn cmp(&self, other: &@[T]) -> Ordering { cmp(*self, *other) } fn cmp(&self, other: &@[T]) -> Ordering { cmp(*self, *other) }
@ -1757,7 +1757,7 @@ fn le<T:Ord>(a: &[T], b: &[T]) -> bool { !lt(b, a) }
fn ge<T:Ord>(a: &[T], b: &[T]) -> bool { !lt(a, b) } fn ge<T:Ord>(a: &[T], b: &[T]) -> bool { !lt(a, b) }
fn gt<T:Ord>(a: &[T], b: &[T]) -> bool { lt(b, a) } fn gt<T:Ord>(a: &[T], b: &[T]) -> bool { lt(b, a) }
#[cfg(notest)] #[cfg(not(test))]
impl<'self,T:Ord> Ord for &'self [T] { impl<'self,T:Ord> Ord for &'self [T] {
#[inline(always)] #[inline(always)]
fn lt(&self, other: & &'self [T]) -> bool { lt((*self), (*other)) } 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)) } fn gt(&self, other: & &'self [T]) -> bool { gt((*self), (*other)) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T:Ord> Ord for ~[T] { impl<T:Ord> Ord for ~[T] {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &~[T]) -> bool { lt((*self), (*other)) } fn lt(&self, other: &~[T]) -> bool { lt((*self), (*other)) }
@ -1781,7 +1781,7 @@ impl<T:Ord> Ord for ~[T] {
fn gt(&self, other: &~[T]) -> bool { gt((*self), (*other)) } fn gt(&self, other: &~[T]) -> bool { gt((*self), (*other)) }
} }
#[cfg(notest)] #[cfg(not(test))]
impl<T:Ord> Ord for @[T] { impl<T:Ord> Ord for @[T] {
#[inline(always)] #[inline(always)]
fn lt(&self, other: &@[T]) -> bool { lt((*self), (*other)) } fn lt(&self, other: &@[T]) -> bool { lt((*self), (*other)) }
@ -1793,7 +1793,7 @@ impl<T:Ord> Ord for @[T] {
fn gt(&self, other: &@[T]) -> bool { gt((*self), (*other)) } fn gt(&self, other: &@[T]) -> bool { gt((*self), (*other)) }
} }
#[cfg(notest)] #[cfg(not(test))]
pub mod traits { pub mod traits {
use kinds::Copy; use kinds::Copy;
use ops::Add; use ops::Add;

View file

@ -119,9 +119,8 @@ pub fn build_configuration(sess: Session, argv0: @~str, input: &input) ->
let default_cfg = default_configuration(sess, argv0, input); let default_cfg = default_configuration(sess, argv0, input);
let user_cfg = /*bad*/copy sess.opts.cfg; let user_cfg = /*bad*/copy sess.opts.cfg;
// If the user wants a test runner, then add the test cfg // If the user wants a test runner, then add the test cfg
let user_cfg = append_configuration( let user_cfg = if sess.opts.test { append_configuration(user_cfg, ~"test") }
user_cfg, else { user_cfg };
if sess.opts.test { ~"test" } else { ~"notest" });
// If the user requested GC, then add the GC cfg // If the user requested GC, then add the GC cfg
let user_cfg = append_configuration( let user_cfg = append_configuration(
user_cfg, user_cfg,