Register snapshots. Remove redundant Eq impls, Makefile hacks

This commit is contained in:
Brian Anderson 2012-09-23 22:25:43 -07:00
parent 2dae768624
commit afd91f8a56
76 changed files with 8 additions and 3677 deletions

View File

@ -357,16 +357,6 @@ EXTRAFLAGS_STAGE$(1) = $$(RUSTFLAGS_STAGE$(1))
CFGFLAG$(1)_T_$(2)_H_$(3) = stage$(1)
# XXX: Terrible hack. No time to explain! Remove after snapshot.
ifeq ($(1),0)
ifeq ($(3),i686-unknown-linux-gnu)
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
endif
ifeq ($(3),i686-apple-darwin)
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
endif
endif
STAGE$(1)_T_$(2)_H_$(3) := \
$$(Q)$$(call CFG_RUN_TARG,$(1), \
$$(CFG_VALGRIND_COMPILE$(1)) \

View File

@ -28,30 +28,6 @@ type package = {
versions: ~[(~str, ~str)]
};
#[cfg(stage0)]
impl package : cmp::Ord {
pure fn lt(&&other: package) -> bool {
if self.name.lt(other.name) { return true; }
if other.name.lt(self.name) { return false; }
if self.uuid.lt(other.uuid) { return true; }
if other.uuid.lt(self.uuid) { return false; }
if self.url.lt(other.url) { return true; }
if other.url.lt(self.url) { return false; }
if self.method.lt(other.method) { return true; }
if other.method.lt(self.method) { return false; }
if self.description.lt(other.description) { return true; }
if other.description.lt(self.description) { return false; }
if self.tags.lt(other.tags) { return true; }
if other.tags.lt(self.tags) { return false; }
if self.versions.lt(other.versions) { return true; }
return false;
}
pure fn le(&&other: package) -> bool { !other.lt(self) }
pure fn ge(&&other: package) -> bool { !self.lt(other) }
pure fn gt(&&other: package) -> bool { other.lt(self) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl package : cmp::Ord {
pure fn lt(other: &package) -> bool {
if self.name.lt(&(*other).name) { return true; }
@ -123,15 +99,6 @@ type options = {
enum mode { system_mode, user_mode, local_mode }
#[cfg(stage0)]
impl mode : cmp::Eq {
pure fn eq(&&other: mode) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: mode) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl mode : cmp::Eq {
pure fn eq(other: &mode) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -1,14 +1,5 @@
enum mode { mode_compile_fail, mode_run_fail, mode_run_pass, mode_pretty, }
#[cfg(stage0)]
impl mode : cmp::Eq {
pure fn eq(&&other: mode) -> bool {
other as int == self as int
}
pure fn ne(&&other: mode) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl mode : cmp::Eq {
pure fn eq(other: &mode) -> bool {
(*other) as int == self as int

View File

@ -10,15 +10,6 @@ use syntax::diagnostic;
enum test_mode { tm_converge, tm_run, }
type context = { mode: test_mode }; // + rng
#[cfg(stage0)]
impl test_mode : cmp::Eq {
pure fn eq(&&other: test_mode) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: test_mode) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl test_mode : cmp::Eq {
pure fn eq(other: &test_mode) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -139,15 +139,6 @@ pure fn from_elem<T: Copy>(n_elts: uint, t: T) -> @[T] {
#[cfg(notest)]
mod traits {
#[legacy_exports];
#[cfg(stage0)]
impl<T: Copy> @[T]: Add<&[const T],@[T]> {
#[inline(always)]
pure fn add(rhs: &[const T]) -> @[T] {
append(self, rhs)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T: Copy> @[T] : Add<&[const T],@[T]> {
#[inline(always)]
pure fn add(rhs: & &[const T]) -> @[T] {

View File

@ -69,13 +69,6 @@ fn all_values(blk: fn(v: bool)) {
/// converts truth value to an 8 bit byte
pure fn to_bit(v: bool) -> u8 { if v { 1u8 } else { 0u8 } }
#[cfg(stage0)]
impl bool : cmp::Eq {
pure fn eq(&&other: bool) -> bool { self == other }
pure fn ne(&&other: bool) -> bool { self != other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl bool : cmp::Eq {
pure fn eq(other: &bool) -> bool { self == (*other) }
pure fn ne(other: &bool) -> bool { self != (*other) }

View File

@ -31,27 +31,11 @@ pure fn ptr_eq<T>(a: @T, b: @T) -> bool {
unsafe { ptr::addr_of(*a) == ptr::addr_of(*b) }
}
#[cfg(stage0)]
impl<T:Eq> @const T : Eq {
pure fn eq(&&other: @const T) -> bool { *self == *other }
pure fn ne(&&other: @const T) -> bool { *self != *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T:Eq> @const T : Eq {
pure fn eq(other: &@const T) -> bool { *self == *(*other) }
pure fn ne(other: &@const T) -> bool { *self != *(*other) }
}
#[cfg(stage0)]
impl<T:Ord> @const T : Ord {
pure fn lt(&&other: @const T) -> bool { *self < *other }
pure fn le(&&other: @const T) -> bool { *self <= *other }
pure fn ge(&&other: @const T) -> bool { *self >= *other }
pure fn gt(&&other: @const T) -> bool { *self > *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T:Ord> @const T : Ord {
pure fn lt(other: &@const T) -> bool { *self < *(*other) }
pure fn le(other: &@const T) -> bool { *self <= *(*other) }

View File

@ -185,13 +185,6 @@ pure fn cmp(a: char, b: char) -> int {
else { 0 }
}
#[cfg(stage0)]
impl char: Eq {
pure fn eq(&&other: char) -> bool { self == other }
pure fn ne(&&other: char) -> bool { self != other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl char : Eq {
pure fn eq(other: &char) -> bool { self == (*other) }
pure fn ne(other: &char) -> bool { self != (*other) }

View File

@ -32,17 +32,6 @@ mod nounittest {
* an `le` method, with the others generated from
* default implementations.
*/
#[cfg(stage0)]
#[lang="ord"]
trait Ord {
pure fn lt(&&other: self) -> bool;
pure fn le(&&other: self) -> bool;
pure fn ge(&&other: self) -> bool;
pure fn gt(&&other: self) -> bool;
}
#[cfg(stage1)]
#[cfg(stage2)]
#[lang="ord"]
trait Ord {
pure fn lt(other: &self) -> bool;
@ -51,7 +40,6 @@ mod nounittest {
pure fn gt(other: &self) -> bool;
}
#[cfg(stage0)]
#[lang="eq"]
/**
* Trait for values that can be compared for equality
@ -61,13 +49,6 @@ mod nounittest {
* an `eq` method, with the other generated from
* a default implementation.
*/
trait Eq {
pure fn eq(&&other: self) -> bool;
pure fn ne(&&other: self) -> bool;
}
#[cfg(stage1)]
#[cfg(stage2)]
#[lang="eq"]
trait Eq {
pure fn eq(other: &self) -> bool;
@ -82,16 +63,6 @@ mod nounittest {
#[cfg(test)]
mod unittest {
#[legacy_exports];
#[cfg(stage0)]
trait Ord {
pure fn lt(&&other: self) -> bool;
pure fn le(&&other: self) -> bool;
pure fn ge(&&other: self) -> bool;
pure fn gt(&&other: self) -> bool;
}
#[cfg(stage1)]
#[cfg(stage2)]
trait Ord {
pure fn lt(other: &self) -> bool;
pure fn le(other: &self) -> bool;
@ -99,14 +70,6 @@ mod unittest {
pure fn gt(other: &self) -> bool;
}
#[cfg(stage0)]
trait Eq {
pure fn eq(&&other: self) -> bool;
pure fn ne(&&other: self) -> bool;
}
#[cfg(stage1)]
#[cfg(stage2)]
trait Eq {
pure fn eq(other: &self) -> bool;
pure fn ne(other: &self) -> bool;
@ -117,68 +80,26 @@ mod unittest {
mod unittest {
#[legacy_exports];}
#[cfg(stage0)]
pure fn lt<T: Ord>(v1: &T, v2: &T) -> bool {
v1.lt(v2)
}
#[cfg(stage0)]
pure fn le<T: Ord Eq>(v1: &T, v2: &T) -> bool {
v1.lt(v2) || v1.eq(v2)
}
#[cfg(stage0)]
pure fn eq<T: Eq>(v1: &T, v2: &T) -> bool {
v1.eq(v2)
}
#[cfg(stage0)]
pure fn ne<T: Eq>(v1: &T, v2: &T) -> bool {
v1.ne(v2)
}
#[cfg(stage0)]
pure fn ge<T: Ord>(v1: &T, v2: &T) -> bool {
v1.ge(v2)
}
#[cfg(stage0)]
pure fn gt<T: Ord>(v1: &T, v2: &T) -> bool {
v1.gt(v2)
}
#[cfg(stage1)]
#[cfg(stage2)]
pure fn lt<T: Ord>(v1: &T, v2: &T) -> bool {
(*v1).lt(v2)
}
#[cfg(stage1)]
#[cfg(stage2)]
pure fn le<T: Ord Eq>(v1: &T, v2: &T) -> bool {
(*v1).lt(v2) || (*v1).eq(v2)
}
#[cfg(stage1)]
#[cfg(stage2)]
pure fn eq<T: Eq>(v1: &T, v2: &T) -> bool {
(*v1).eq(v2)
}
#[cfg(stage1)]
#[cfg(stage2)]
pure fn ne<T: Eq>(v1: &T, v2: &T) -> bool {
(*v1).ne(v2)
}
#[cfg(stage1)]
#[cfg(stage2)]
pure fn ge<T: Ord>(v1: &T, v2: &T) -> bool {
(*v1).ge(v2)
}
#[cfg(stage1)]
#[cfg(stage2)]
pure fn gt<T: Ord>(v1: &T, v2: &T) -> bool {
(*v1).gt(v2)
}

View File

@ -126,28 +126,6 @@ pure fn unwrap_right<T,U>(+eith: Either<T,U>) -> U {
}
}
#[cfg(stage0)]
impl<T:Eq,U:Eq> Either<T,U> : Eq {
pure fn eq(&&other: Either<T,U>) -> bool {
match self {
Left(a) => {
match other {
Left(b) => a.eq(b),
Right(_) => false
}
}
Right(a) => {
match other {
Left(_) => false,
Right(b) => a.eq(b)
}
}
}
}
pure fn ne(&&other: Either<T,U>) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T:Eq,U:Eq> Either<T,U> : Eq {
pure fn eq(other: &Either<T,U>) -> bool {
match self {

View File

@ -388,24 +388,6 @@ mod rt {
enum PadMode { PadSigned, PadUnsigned, PadNozero, PadFloat }
#[cfg(stage0)]
impl PadMode: Eq {
pure fn eq(&&other: PadMode) -> bool {
match (self, other) {
(PadSigned, PadSigned) => true,
(PadUnsigned, PadUnsigned) => true,
(PadNozero, PadNozero) => true,
(PadFloat, PadFloat) => true,
(PadSigned, _) => false,
(PadUnsigned, _) => false,
(PadNozero, _) => false,
(PadFloat, _) => false
}
}
pure fn ne(&&other: PadMode) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl PadMode : Eq {
pure fn eq(other: &PadMode) -> bool {
match (self, (*other)) {
@ -595,24 +577,6 @@ mod rt2 {
enum PadMode { PadSigned, PadUnsigned, PadNozero, PadFloat }
#[cfg(stage0)]
impl PadMode: Eq {
pure fn eq(&&other: PadMode) -> bool {
match (self, other) {
(PadSigned, PadSigned) => true,
(PadUnsigned, PadUnsigned) => true,
(PadNozero, PadNozero) => true,
(PadFloat, PadFloat) => true,
(PadSigned, _) => false,
(PadUnsigned, _) => false,
(PadNozero, _) => false,
(PadFloat, _) => false
}
}
pure fn ne(&&other: PadMode) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl PadMode : Eq {
pure fn eq(other: &PadMode) -> bool {
match (self, (*other)) {

View File

@ -415,27 +415,11 @@ pure fn sin(x: float) -> float { f64::sin(x as f64) as float }
pure fn cos(x: float) -> float { f64::cos(x as f64) as float }
pure fn tan(x: float) -> float { f64::tan(x as f64) as float }
#[cfg(stage0)]
impl float: Eq {
pure fn eq(&&other: float) -> bool { self == other }
pure fn ne(&&other: float) -> bool { self != other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl float : Eq {
pure fn eq(other: &float) -> bool { self == (*other) }
pure fn ne(other: &float) -> bool { self != (*other) }
}
#[cfg(stage0)]
impl float: Ord {
pure fn lt(&&other: float) -> bool { self < other }
pure fn le(&&other: float) -> bool { self <= other }
pure fn ge(&&other: float) -> bool { self >= other }
pure fn gt(&&other: float) -> bool { self > other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl float : Ord {
pure fn lt(other: &float) -> bool { self < (*other) }
pure fn le(other: &float) -> bool { self <= (*other) }

View File

@ -68,15 +68,6 @@ pure fn abs(i: T) -> T {
if is_negative(i) { -i } else { i }
}
#[cfg(stage0)]
impl T: Ord {
pure fn lt(&&other: T) -> bool { return self < other; }
pure fn le(&&other: T) -> bool { return self <= other; }
pure fn ge(&&other: T) -> bool { return self >= other; }
pure fn gt(&&other: T) -> bool { return self > other; }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl T : Ord {
pure fn lt(other: &T) -> bool { return self < (*other); }
pure fn le(other: &T) -> bool { return self <= (*other); }
@ -84,13 +75,6 @@ impl T : Ord {
pure fn gt(other: &T) -> bool { return self > (*other); }
}
#[cfg(stage0)]
impl T: Eq {
pure fn eq(&&other: T) -> bool { return self == other; }
pure fn ne(&&other: T) -> bool { return self != other; }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl T : Eq {
pure fn eq(other: &T) -> bool { return self == (*other); }
pure fn ne(other: &T) -> bool { return self != (*other); }

View File

@ -329,18 +329,6 @@ enum FileFlag { Append, Create, Truncate, NoFlag, }
// What type of writer are we?
enum WriterType { Screen, File }
#[cfg(stage0)]
impl WriterType: Eq {
pure fn eq(&&other: WriterType) -> bool {
match (self, other) {
(Screen, Screen) | (File, File) => true,
(Screen, _) | (File, _) => false
}
}
pure fn ne(&&other: WriterType) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl WriterType : Eq {
pure fn eq(other: &WriterType) -> bool {
match (self, (*other)) {

View File

@ -20,66 +20,26 @@ trait Owned {
// Empty.
}
#[cfg(stage0)]
#[lang="add"]
trait Add<RHS,Result> {
pure fn add(rhs: RHS) -> Result;
}
#[cfg(stage1)]
#[cfg(stage2)]
#[lang="add"]
trait Add<RHS,Result> {
pure fn add(rhs: &RHS) -> Result;
}
#[cfg(stage0)]
#[lang="sub"]
trait Sub<RHS,Result> {
pure fn sub(rhs: RHS) -> Result;
}
#[cfg(stage1)]
#[cfg(stage2)]
#[lang="sub"]
trait Sub<RHS,Result> {
pure fn sub(rhs: &RHS) -> Result;
}
#[cfg(stage0)]
#[lang="mul"]
trait Mul<RHS,Result> {
pure fn mul(rhs: RHS) -> Result;
}
#[cfg(stage1)]
#[cfg(stage2)]
#[lang="mul"]
trait Mul<RHS,Result> {
pure fn mul(rhs: &RHS) -> Result;
}
#[cfg(stage0)]
#[lang="div"]
trait Div<RHS,Result> {
pure fn div(rhs: RHS) -> Result;
}
#[cfg(stage1)]
#[cfg(stage2)]
#[lang="div"]
trait Div<RHS,Result> {
pure fn div(rhs: &RHS) -> Result;
}
#[cfg(stage0)]
#[lang="modulo"]
trait Modulo<RHS,Result> {
pure fn modulo(rhs: RHS) -> Result;
}
#[cfg(stage1)]
#[cfg(stage2)]
#[lang="modulo"]
trait Modulo<RHS,Result> {
pure fn modulo(rhs: &RHS) -> Result;
@ -90,66 +50,26 @@ trait Neg<Result> {
pure fn neg() -> Result;
}
#[cfg(stage0)]
#[lang="bitand"]
trait BitAnd<RHS,Result> {
pure fn bitand(rhs: RHS) -> Result;
}
#[cfg(stage1)]
#[cfg(stage2)]
#[lang="bitand"]
trait BitAnd<RHS,Result> {
pure fn bitand(rhs: &RHS) -> Result;
}
#[cfg(stage0)]
#[lang="bitor"]
trait BitOr<RHS,Result> {
pure fn bitor(rhs: RHS) -> Result;
}
#[cfg(stage1)]
#[cfg(stage2)]
#[lang="bitor"]
trait BitOr<RHS,Result> {
pure fn bitor(rhs: &RHS) -> Result;
}
#[cfg(stage0)]
#[lang="bitxor"]
trait BitXor<RHS,Result> {
pure fn bitxor(rhs: RHS) -> Result;
}
#[cfg(stage1)]
#[cfg(stage2)]
#[lang="bitxor"]
trait BitXor<RHS,Result> {
pure fn bitxor(rhs: &RHS) -> Result;
}
#[cfg(stage0)]
#[lang="shl"]
trait Shl<RHS,Result> {
pure fn shl(rhs: RHS) -> Result;
}
#[cfg(stage1)]
#[cfg(stage2)]
#[lang="shl"]
trait Shl<RHS,Result> {
pure fn shl(rhs: &RHS) -> Result;
}
#[cfg(stage0)]
#[lang="shr"]
trait Shr<RHS,Result> {
pure fn shr(rhs: RHS) -> Result;
}
#[cfg(stage1)]
#[cfg(stage2)]
#[lang="shr"]
trait Shr<RHS,Result> {
pure fn shr(rhs: &RHS) -> Result;

View File

@ -255,28 +255,6 @@ impl<T: Copy> Option<T> {
pure fn while_some(blk: fn(+v: T) -> Option<T>) { while_some(self, blk) }
}
#[cfg(stage0)]
impl<T: Eq> Option<T> : Eq {
pure fn eq(&&other: Option<T>) -> bool {
match self {
None => {
match other {
None => true,
Some(_) => false
}
}
Some(self_contents) => {
match other {
None => false,
Some(other_contents) => self_contents.eq(other_contents)
}
}
}
}
pure fn ne(&&other: Option<T>) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T: Eq> Option<T> : Eq {
pure fn eq(other: &Option<T>) -> bool {
match self {

View File

@ -70,16 +70,6 @@ impl PosixPath : ToStr {
}
}
#[cfg(stage0)]
impl PosixPath : Eq {
pure fn eq(&&other: PosixPath) -> bool {
return self.is_absolute == other.is_absolute &&
self.components == other.components;
}
pure fn ne(&&other: PosixPath) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl PosixPath : Eq {
pure fn eq(other: &PosixPath) -> bool {
return self.is_absolute == (*other).is_absolute &&
@ -88,18 +78,6 @@ impl PosixPath : Eq {
pure fn ne(other: &PosixPath) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl WindowsPath : Eq {
pure fn eq(&&other: WindowsPath) -> bool {
return self.host == other.host &&
self.device == other.device &&
self.is_absolute == other.is_absolute &&
self.components == other.components;
}
pure fn ne(&&other: WindowsPath) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl WindowsPath : Eq {
pure fn eq(other: &WindowsPath) -> bool {
return self.host == (*other).host &&

View File

@ -116,15 +116,6 @@ enum State {
Terminated
}
#[cfg(stage0)]
impl State: Eq {
pure fn eq(&&other: State) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: State) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl State : Eq {
pure fn eq(other: &State) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -205,17 +205,6 @@ impl<T> *T: Ptr {
}
// Equality for pointers
#[cfg(stage0)]
impl<T> *const T : Eq {
pure fn eq(&&other: *const T) -> bool unsafe {
let a: uint = cast::reinterpret_cast(&self);
let b: uint = cast::reinterpret_cast(&other);
return a == b;
}
pure fn ne(&&other: *const T) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T> *const T : Eq {
pure fn eq(other: &*const T) -> bool unsafe {
let a: uint = cast::reinterpret_cast(&self);
@ -226,31 +215,6 @@ impl<T> *const T : Eq {
}
// Comparison for pointers
#[cfg(stage0)]
impl<T> *const T : Ord {
pure fn lt(&&other: *const T) -> bool unsafe {
let a: uint = cast::reinterpret_cast(&self);
let b: uint = cast::reinterpret_cast(&other);
return a < b;
}
pure fn le(&&other: *const T) -> bool unsafe {
let a: uint = cast::reinterpret_cast(&self);
let b: uint = cast::reinterpret_cast(&other);
return a <= b;
}
pure fn ge(&&other: *const T) -> bool unsafe {
let a: uint = cast::reinterpret_cast(&self);
let b: uint = cast::reinterpret_cast(&other);
return a >= b;
}
pure fn gt(&&other: *const T) -> bool unsafe {
let a: uint = cast::reinterpret_cast(&self);
let b: uint = cast::reinterpret_cast(&other);
return a > b;
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T> *const T : Ord {
pure fn lt(other: &*const T) -> bool unsafe {
let a: uint = cast::reinterpret_cast(&self);
@ -275,28 +239,12 @@ impl<T> *const T : Ord {
}
// Equality for region pointers
#[cfg(stage0)]
impl<T:Eq> &const T : Eq {
pure fn eq(&&other: &const T) -> bool { return *self == *other; }
pure fn ne(&&other: &const T) -> bool { return *self != *other; }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T:Eq> &const T : Eq {
pure fn eq(other: & &const T) -> bool { return *self == *(*other); }
pure fn ne(other: & &const T) -> bool { return *self != *(*other); }
}
// Comparison for region pointers
#[cfg(stage0)]
impl<T:Ord> &const T : Ord {
pure fn lt(&&other: &const T) -> bool { *self < *other }
pure fn le(&&other: &const T) -> bool { *self <= *other }
pure fn ge(&&other: &const T) -> bool { *self >= *other }
pure fn gt(&&other: &const T) -> bool { *self > *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T:Ord> &const T : Ord {
pure fn lt(other: & &const T) -> bool { *self < *(*other) }
pure fn le(other: & &const T) -> bool { *self <= *(*other) }

View File

@ -510,15 +510,6 @@ enum EnumVisitState {
Degenerate // This is a degenerate enum (exactly 1 variant)
}
#[cfg(stage0)]
impl EnumVisitState : cmp::Eq {
pure fn eq(&&other: EnumVisitState) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: EnumVisitState) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl EnumVisitState : cmp::Eq {
pure fn eq(other: &EnumVisitState) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -354,28 +354,6 @@ fn unwrap_err<T, U>(+res: Result<T, U>) -> U {
}
}
#[cfg(stage0)]
impl<T:Eq,U:Eq> Result<T,U> : Eq {
pure fn eq(&&other: Result<T,U>) -> bool {
match self {
Ok(e0a) => {
match other {
Ok(e0b) => e0a == e0b,
_ => false
}
}
Err(e0a) => {
match other {
Err(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: Result<T,U>) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T:Eq,U:Eq> Result<T,U> : Eq {
pure fn eq(other: &Result<T,U>) -> bool {
match self {

View File

@ -804,17 +804,6 @@ pure fn gt(a: &str, b: &str) -> bool {
!le(a, b)
}
#[cfg(stage0)]
impl &str: Eq {
#[inline(always)]
pure fn eq(&&other: &str) -> bool {
eq_slice(self, other)
}
#[inline(always)]
pure fn ne(&&other: &str) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl &str : Eq {
#[inline(always)]
pure fn eq(other: & &str) -> bool {
@ -824,17 +813,6 @@ impl &str : Eq {
pure fn ne(other: & &str) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl ~str: Eq {
#[inline(always)]
pure fn eq(&&other: ~str) -> bool {
eq_slice(self, other)
}
#[inline(always)]
pure fn ne(&&other: ~str) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ~str : Eq {
#[inline(always)]
pure fn eq(other: &~str) -> bool {
@ -844,17 +822,6 @@ impl ~str : Eq {
pure fn ne(other: &~str) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl @str: Eq {
#[inline(always)]
pure fn eq(&&other: @str) -> bool {
eq_slice(self, other)
}
#[inline(always)]
pure fn ne(&&other: @str) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl @str : Eq {
#[inline(always)]
pure fn eq(other: &@str) -> bool {
@ -864,19 +831,6 @@ impl @str : Eq {
pure fn ne(other: &@str) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl ~str : Ord {
#[inline(always)]
pure fn lt(&&other: ~str) -> bool { lt(self, other) }
#[inline(always)]
pure fn le(&&other: ~str) -> bool { le(self, other) }
#[inline(always)]
pure fn ge(&&other: ~str) -> bool { ge(self, other) }
#[inline(always)]
pure fn gt(&&other: ~str) -> bool { gt(self, other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ~str : Ord {
#[inline(always)]
pure fn lt(other: &~str) -> bool { lt(self, (*other)) }
@ -888,19 +842,6 @@ impl ~str : Ord {
pure fn gt(other: &~str) -> bool { gt(self, (*other)) }
}
#[cfg(stage0)]
impl &str : Ord {
#[inline(always)]
pure fn lt(&&other: &str) -> bool { lt(self, other) }
#[inline(always)]
pure fn le(&&other: &str) -> bool { le(self, other) }
#[inline(always)]
pure fn ge(&&other: &str) -> bool { ge(self, other) }
#[inline(always)]
pure fn gt(&&other: &str) -> bool { gt(self, other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl &str : Ord {
#[inline(always)]
pure fn lt(other: & &str) -> bool { lt(self, (*other)) }
@ -912,19 +853,6 @@ impl &str : Ord {
pure fn gt(other: & &str) -> bool { gt(self, (*other)) }
}
#[cfg(stage0)]
impl @str : Ord {
#[inline(always)]
pure fn lt(&&other: @str) -> bool { lt(self, other) }
#[inline(always)]
pure fn le(&&other: @str) -> bool { le(self, other) }
#[inline(always)]
pure fn ge(&&other: @str) -> bool { ge(self, other) }
#[inline(always)]
pure fn gt(&&other: @str) -> bool { gt(self, other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl @str : Ord {
#[inline(always)]
pure fn lt(other: &@str) -> bool { lt(self, (*other)) }
@ -2244,15 +2172,6 @@ impl ~str: UniqueStr {
#[cfg(notest)]
mod traits {
#[legacy_exports];
#[cfg(stage0)]
impl ~str: Add<&str,~str> {
#[inline(always)]
pure fn add(rhs: &str) -> ~str {
append(copy self, rhs)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ~str : Add<&str,~str> {
#[inline(always)]
pure fn add(rhs: & &str) -> ~str {

View File

@ -83,13 +83,6 @@ enum Task {
TaskHandle(task_id)
}
#[cfg(stage0)]
impl Task : cmp::Eq {
pure fn eq(&&other: Task) -> bool { *self == *other }
pure fn ne(&&other: Task) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Task : cmp::Eq {
pure fn eq(other: &Task) -> bool { *self == *(*other) }
pure fn ne(other: &Task) -> bool { !self.eq(other) }
@ -111,18 +104,6 @@ enum TaskResult {
Failure,
}
#[cfg(stage0)]
impl TaskResult: Eq {
pure fn eq(&&other: TaskResult) -> bool {
match (self, other) {
(Success, Success) | (Failure, Failure) => true,
(Success, _) | (Failure, _) => false
}
}
pure fn ne(&&other: TaskResult) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl TaskResult : Eq {
pure fn eq(other: &TaskResult) -> bool {
match (self, (*other)) {
@ -139,21 +120,6 @@ enum Notification {
Exit(Task, TaskResult)
}
#[cfg(stage0)]
impl Notification : cmp::Eq {
pure fn eq(&&other: Notification) -> bool {
match self {
Exit(e0a, e1a) => {
match other {
Exit(e0b, e1b) => e0a == e0b && e1a == e1b
}
}
}
}
pure fn ne(&&other: Notification) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Notification : cmp::Eq {
pure fn eq(other: &Notification) -> bool {
match self {
@ -186,48 +152,6 @@ enum SchedMode {
PlatformThread
}
#[cfg(stage0)]
impl SchedMode : cmp::Eq {
pure fn eq(&&other: SchedMode) -> bool {
match self {
SingleThreaded => {
match other {
SingleThreaded => true,
_ => false
}
}
ThreadPerCore => {
match other {
ThreadPerCore => true,
_ => false
}
}
ThreadPerTask => {
match other {
ThreadPerTask => true,
_ => false
}
}
ManualThreads(e0a) => {
match other {
ManualThreads(e0b) => e0a == e0b,
_ => false
}
}
PlatformThread => {
match other {
PlatformThread => true,
_ => false
}
}
}
}
pure fn ne(&&other: SchedMode) -> bool {
!self.eq(other)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl SchedMode : cmp::Eq {
pure fn eq(other: &SchedMode) -> bool {
match self {

View File

@ -6,17 +6,6 @@ use rt::rust_task;
trait LocalData { }
impl<T: Owned> @T: LocalData { }
#[cfg(stage0)]
impl LocalData: Eq {
pure fn eq(&&other: LocalData) -> bool unsafe {
let ptr_a: (uint, uint) = cast::reinterpret_cast(&self);
let ptr_b: (uint, uint) = cast::reinterpret_cast(&other);
return ptr_a == ptr_b;
}
pure fn ne(&&other: LocalData) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl LocalData: Eq {
pure fn eq(other: &@LocalData) -> bool unsafe {
let ptr_a: (uint, uint) = cast::reinterpret_cast(&self);

View File

@ -67,25 +67,6 @@ impl<A: Copy, B: Copy> (~[A], ~[B]): ExtendedTupleOps<A,B> {
}
}
#[cfg(stage0)]
impl<A: Eq, B: Eq> (A, B): Eq {
pure fn eq(&&other: (A, B)) -> bool {
// XXX: This would be a lot less wordy with ref bindings, but I don't
// trust that they work yet.
match self {
(self_a, self_b) => {
match other {
(other_a, other_b) => {
self_a.eq(other_a) && self_b.eq(other_b)
}
}
}
}
}
pure fn ne(&&other: (A, B)) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<A: Eq, B: Eq> (A, B) : Eq {
pure fn eq(other: &(A, B)) -> bool {
// XXX: This would be a lot less wordy with ref bindings, but I don't
@ -103,28 +84,6 @@ impl<A: Eq, B: Eq> (A, B) : Eq {
pure fn ne(other: &(A, B)) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl<A: Ord, B: Ord> (A, B): Ord {
pure fn lt(&&other: (A, B)) -> bool {
match self {
(self_a, self_b) => {
match other {
(other_a, other_b) => {
if self_a.lt(other_a) { return true; }
if other_a.lt(self_a) { return false; }
if self_b.lt(other_b) { return true; }
return false;
}
}
}
}
}
pure fn le(&&other: (A, B)) -> bool { !other.lt(self) }
pure fn ge(&&other: (A, B)) -> bool { !self.lt(other) }
pure fn gt(&&other: (A, B)) -> bool { other.lt(self) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<A: Ord, B: Ord> (A, B) : Ord {
pure fn lt(other: &(A, B)) -> bool {
match self {
@ -145,27 +104,6 @@ impl<A: Ord, B: Ord> (A, B) : Ord {
pure fn gt(other: &(A, B)) -> bool { (*other).lt(&self) }
}
#[cfg(stage0)]
impl<A: Eq, B: Eq, C: Eq> (A, B, C): Eq {
pure fn eq(&&other: (A, B, C)) -> bool {
// XXX: This would be a lot less wordy with ref bindings, but I don't
// trust that they work yet.
match self {
(self_a, self_b, self_c) => {
match other {
(other_a, other_b, other_c) => {
self_a.eq(other_a) &&
self_b.eq(other_b) &&
self_c.eq(other_c)
}
}
}
}
}
pure fn ne(&&other: (A, B, C)) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<A: Eq, B: Eq, C: Eq> (A, B, C) : Eq {
pure fn eq(other: &(A, B, C)) -> bool {
// XXX: This would be a lot less wordy with ref bindings, but I don't
@ -185,30 +123,6 @@ impl<A: Eq, B: Eq, C: Eq> (A, B, C) : Eq {
pure fn ne(other: &(A, B, C)) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl<A: Ord, B: Ord, C: Ord> (A, B, C): Ord {
pure fn lt(&&other: (A, B, C)) -> bool {
match self {
(self_a, self_b, self_c) => {
match other {
(other_a, other_b, other_c) => {
if self_a.lt(other_a) { return true; }
if other_a.lt(self_a) { return false; }
if self_b.lt(other_b) { return true; }
if other_b.lt(self_b) { return false; }
if self_c.lt(other_c) { return true; }
return false;
}
}
}
}
}
pure fn le(&&other: (A, B, C)) -> bool { !other.lt(self) }
pure fn ge(&&other: (A, B, C)) -> bool { !self.lt(other) }
pure fn gt(&&other: (A, B, C)) -> bool { other.lt(self) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<A: Ord, B: Ord, C: Ord> (A, B, C) : Ord {
pure fn lt(other: &(A, B, C)) -> bool {
match self {

View File

@ -61,15 +61,6 @@ pure fn compl(i: T) -> T {
max_value ^ i
}
#[cfg(stage0)]
impl T: Ord {
pure fn lt(&&other: T) -> bool { self < other }
pure fn le(&&other: T) -> bool { self <= other }
pure fn ge(&&other: T) -> bool { self >= other }
pure fn gt(&&other: T) -> bool { self > other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl T : Ord {
pure fn lt(other: &T) -> bool { self < (*other) }
pure fn le(other: &T) -> bool { self <= (*other) }
@ -77,13 +68,6 @@ impl T : Ord {
pure fn gt(other: &T) -> bool { self > (*other) }
}
#[cfg(stage0)]
impl T: Eq {
pure fn eq(&&other: T) -> bool { return self == other; }
pure fn ne(&&other: T) -> bool { return self != other; }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl T : Eq {
pure fn eq(other: &T) -> bool { return self == (*other); }
pure fn ne(other: &T) -> bool { return self != (*other); }

View File

@ -2,27 +2,11 @@
use cmp::{Eq, Ord};
#[cfg(stage0)]
impl<T:Eq> ~const T : Eq {
pure fn eq(&&other: ~const T) -> bool { *self == *other }
pure fn ne(&&other: ~const T) -> bool { *self != *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T:Eq> ~const T : Eq {
pure fn eq(other: &~const T) -> bool { *self == *(*other) }
pure fn ne(other: &~const T) -> bool { *self != *(*other) }
}
#[cfg(stage0)]
impl<T:Ord> ~const T : Ord {
pure fn lt(&&other: ~const T) -> bool { *self < *other }
pure fn le(&&other: ~const T) -> bool { *self <= *other }
pure fn ge(&&other: ~const T) -> bool { *self >= *other }
pure fn gt(&&other: ~const T) -> bool { *self > *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T:Ord> ~const T : Ord {
pure fn lt(other: &~const T) -> bool { *self < *(*other) }
pure fn le(other: &~const T) -> bool { *self <= *(*other) }

View File

@ -6,27 +6,11 @@ Functions for the unit type.
use cmp::{Eq, Ord};
#[cfg(stage0)]
impl () : Eq {
pure fn eq(&&_other: ()) -> bool { true }
pure fn ne(&&_other: ()) -> bool { false }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl () : Eq {
pure fn eq(_other: &()) -> bool { true }
pure fn ne(_other: &()) -> bool { false }
}
#[cfg(stage0)]
impl () : Ord {
pure fn lt(&&_other: ()) -> bool { false }
pure fn le(&&_other: ()) -> bool { true }
pure fn ge(&&_other: ()) -> bool { true }
pure fn gt(&&_other: ()) -> bool { false }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl () : Ord {
pure fn lt(_other: &()) -> bool { false }
pure fn le(_other: &()) -> bool { true }

View File

@ -1370,15 +1370,6 @@ pure fn eq<T: Eq>(a: &[T], b: &[T]) -> bool {
return true;
}
#[cfg(stage0)]
impl<T: Eq> &[T]: Eq {
#[inline(always)]
pure fn eq(&&other: &[T]) -> bool { eq(self, other) }
#[inline(always)]
pure fn ne(&&other: &[T]) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T: Eq> &[T] : Eq {
#[inline(always)]
pure fn eq(other: & &[T]) -> bool { eq(self, (*other)) }
@ -1386,15 +1377,6 @@ impl<T: Eq> &[T] : Eq {
pure fn ne(other: & &[T]) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl<T: Eq> ~[T]: Eq {
#[inline(always)]
pure fn eq(&&other: ~[T]) -> bool { eq(self, other) }
#[inline(always)]
pure fn ne(&&other: ~[T]) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T: Eq> ~[T] : Eq {
#[inline(always)]
pure fn eq(other: &~[T]) -> bool { eq(self, (*other)) }
@ -1402,15 +1384,6 @@ impl<T: Eq> ~[T] : Eq {
pure fn ne(other: &~[T]) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl<T: Eq> @[T]: Eq {
#[inline(always)]
pure fn eq(&&other: @[T]) -> bool { eq(self, other) }
#[inline(always)]
pure fn ne(&&other: @[T]) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T: Eq> @[T] : Eq {
#[inline(always)]
pure fn eq(other: &@[T]) -> bool { eq(self, (*other)) }
@ -1439,19 +1412,6 @@ pure fn le<T: Ord>(a: &[T], b: &[T]) -> bool { !lt(b, a) }
pure fn ge<T: Ord>(a: &[T], b: &[T]) -> bool { !lt(a, b) }
pure fn gt<T: Ord>(a: &[T], b: &[T]) -> bool { lt(b, a) }
#[cfg(stage0)]
impl<T: Ord> &[T]: Ord {
#[inline(always)]
pure fn lt(&&other: &[T]) -> bool { lt(self, other) }
#[inline(always)]
pure fn le(&&other: &[T]) -> bool { le(self, other) }
#[inline(always)]
pure fn ge(&&other: &[T]) -> bool { ge(self, other) }
#[inline(always)]
pure fn gt(&&other: &[T]) -> bool { gt(self, other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T: Ord> &[T] : Ord {
#[inline(always)]
pure fn lt(other: & &[T]) -> bool { lt(self, (*other)) }
@ -1463,19 +1423,6 @@ impl<T: Ord> &[T] : Ord {
pure fn gt(other: & &[T]) -> bool { gt(self, (*other)) }
}
#[cfg(stage0)]
impl<T: Ord> ~[T]: Ord {
#[inline(always)]
pure fn lt(&&other: ~[T]) -> bool { lt(self, other) }
#[inline(always)]
pure fn le(&&other: ~[T]) -> bool { le(self, other) }
#[inline(always)]
pure fn ge(&&other: ~[T]) -> bool { ge(self, other) }
#[inline(always)]
pure fn gt(&&other: ~[T]) -> bool { gt(self, other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T: Ord> ~[T] : Ord {
#[inline(always)]
pure fn lt(other: &~[T]) -> bool { lt(self, (*other)) }
@ -1487,19 +1434,6 @@ impl<T: Ord> ~[T] : Ord {
pure fn gt(other: &~[T]) -> bool { gt(self, (*other)) }
}
#[cfg(stage0)]
impl<T: Ord> @[T]: Ord {
#[inline(always)]
pure fn lt(&&other: @[T]) -> bool { lt(self, other) }
#[inline(always)]
pure fn le(&&other: @[T]) -> bool { le(self, other) }
#[inline(always)]
pure fn ge(&&other: @[T]) -> bool { ge(self, other) }
#[inline(always)]
pure fn gt(&&other: @[T]) -> bool { gt(self, other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T: Ord> @[T] : Ord {
#[inline(always)]
pure fn lt(other: &@[T]) -> bool { lt(self, (*other)) }
@ -1514,16 +1448,6 @@ impl<T: Ord> @[T] : Ord {
#[cfg(notest)]
mod traits {
#[legacy_exports];
#[cfg(stage0)]
impl<T: Copy> ~[T]: Add<&[const T],~[T]> {
#[inline(always)]
pure fn add(rhs: &[const T]) -> ~[T] {
append(copy self, rhs)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T: Copy> ~[T] : Add<&[const T],~[T]> {
#[inline(always)]
pure fn add(rhs: & &[const T]) -> ~[T] {
@ -1531,16 +1455,6 @@ mod traits {
}
}
#[cfg(stage0)]
impl<T: Copy> ~[mut T]: Add<&[const T],~[mut T]> {
#[inline(always)]
pure fn add(rhs: &[const T]) -> ~[mut T] {
append_mut(copy self, rhs)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T: Copy> ~[mut T] : Add<&[const T],~[mut T]> {
#[inline(always)]
pure fn add(rhs: & &[const T]) -> ~[mut T] {

View File

@ -240,28 +240,6 @@ mod tests {
type RecCy = {x: int, y: int, t: Taggy};
#[cfg(stage0)]
impl Taggy : Eq {
pure fn eq(other: Taggy) -> bool {
match self {
One(a1) => match other {
One(b1) => return a1 == b1,
_ => return false
},
Two(a1, a2) => match other {
Two(b1, b2) => return a1 == b1 && a2 == b2,
_ => return false
},
Three(a1, a2, a3) => match other {
Three(b1, b2, b3) => return a1 == b1 && a2 == b2 && a3 == b3,
_ => return false
}
}
}
pure fn ne(other: Taggy) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Taggy : Eq {
pure fn eq(other: &Taggy) -> bool {
match self {
@ -282,31 +260,6 @@ mod tests {
pure fn ne(other: &Taggy) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl Taggypar<int> : Eq {
//let eq4: EqFn<Taggypar<int>> = |x,y| taggypareq::<int>(x, y);
pure fn eq(other: Taggypar<int>) -> bool {
match self {
Onepar::<int>(a1) => match other {
Onepar::<int>(b1) => return a1 == b1,
_ => return false
},
Twopar::<int>(a1, a2) => match other {
Twopar::<int>(b1, b2) => return a1 == b1 && a2 == b2,
_ => return false
},
Threepar::<int>(a1, a2, a3) => match other {
Threepar::<int>(b1, b2, b3) => {
return a1 == b1 && a2 == b2 && a3 == b3
}
_ => return false
}
}
}
pure fn ne(other: Taggypar<int>) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Taggypar<int> : Eq {
//let eq4: EqFn<Taggypar<int>> = |x,y| taggypareq::<int>(x, y);
pure fn eq(other: &Taggypar<int>) -> bool {
@ -330,15 +283,6 @@ mod tests {
pure fn ne(other: &Taggypar<int>) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl RecCy : Eq {
pure fn eq(other: RecCy) -> bool {
return self.x == other.x && self.y == other.y && self.t == other.t;
}
pure fn ne(other: RecCy) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl RecCy : Eq {
pure fn eq(other: &RecCy) -> bool {
return self.x == (*other).x && self.y == (*other).y &&

View File

@ -107,28 +107,6 @@ fn mkname(nm: &str) -> Name {
} else { Long(unm) };
}
#[cfg(stage0)]
impl Name : Eq {
pure fn eq(&&other: Name) -> bool {
match self {
Long(e0a) => {
match other {
Long(e0b) => e0a == e0b,
_ => false
}
}
Short(e0a) => {
match other {
Short(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: Name) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Name : Eq {
pure fn eq(other: &Name) -> bool {
match self {
@ -149,15 +127,6 @@ impl Name : Eq {
pure fn ne(other: &Name) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl Occur : Eq {
pure fn eq(&&other: Occur) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: Occur) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Occur : Eq {
pure fn eq(other: &Occur) -> bool {
(self as uint) == ((*other) as uint)
@ -478,15 +447,6 @@ enum FailType {
UnexpectedArgument_,
}
#[cfg(stage0)]
impl FailType : Eq {
pure fn eq(&&other: FailType) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: FailType) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl FailType : Eq {
pure fn eq(other: &FailType) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -676,17 +676,6 @@ pure fn lt(value0: Json, value1: Json) -> bool {
}
}
#[cfg(stage0)]
impl Error : Eq {
pure fn eq(&&other: Error) -> bool {
self.line == other.line &&
self.col == other.col &&
self.msg == other.msg
}
pure fn ne(&&other: Error) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Error : Eq {
pure fn eq(other: &Error) -> bool {
self.line == (*other).line &&
@ -696,27 +685,11 @@ impl Error : Eq {
pure fn ne(other: &Error) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl Json : Eq {
pure fn eq(&&other: Json) -> bool { eq(self, other) }
pure fn ne(&&other: Json) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Json : Eq {
pure fn eq(other: &Json) -> bool { eq(self, (*other)) }
pure fn ne(other: &Json) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl Json : Ord {
pure fn lt(&&other: Json) -> bool { lt(self, other) }
pure fn le(&&other: Json) -> bool { !other.lt(self) }
pure fn ge(&&other: Json) -> bool { !self.lt(other) }
pure fn gt(&&other: Json) -> bool { other.lt(self) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Json : Ord {
pure fn lt(other: &Json) -> bool { lt(self, (*other)) }
pure fn le(other: &Json) -> bool { !(*other).lt(&self) }

View File

@ -148,28 +148,6 @@ fn each<T>(l: @List<T>, f: fn(T) -> bool) {
}
}
#[cfg(stage0)]
impl<T:Eq> List<T> : Eq {
pure fn eq(&&other: List<T>) -> bool {
match self {
Cons(e0a, e1a) => {
match other {
Cons(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
Nil => {
match other {
Nil => true,
_ => false
}
}
}
}
pure fn ne(&&other: List<T>) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T:Eq> List<T> : Eq {
pure fn eq(other: &List<T>) -> bool {
match self {

View File

@ -317,15 +317,6 @@ fn userinfo_to_str(+userinfo: UserInfo) -> ~str {
}
}
#[cfg(stage0)]
impl UserInfo : Eq {
pure fn eq(&&other: UserInfo) -> bool {
self.user == other.user && self.pass == other.pass
}
pure fn ne(&&other: UserInfo) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl UserInfo : Eq {
pure fn eq(other: &UserInfo) -> bool {
self.user == (*other).user && self.pass == (*other).pass
@ -386,22 +377,6 @@ enum Input {
Unreserved // all other legal characters
}
#[cfg(stage0)]
impl Input: Eq {
pure fn eq(&&other: Input) -> bool {
match (self, other) {
(Digit, Digit) => true,
(Hex, Hex) => true,
(Unreserved, Unreserved) => true,
(Digit, _) => false,
(Hex, _) => false,
(Unreserved, _) => false
}
}
pure fn ne(&&other: Input) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Input : Eq {
pure fn eq(other: &Input) -> bool {
match (self, (*other)) {
@ -744,24 +719,6 @@ impl Url: to_str::ToStr {
}
}
#[cfg(stage0)]
impl Url: Eq {
pure fn eq(&&other: Url) -> bool {
self.scheme == other.scheme
&& self.user == other.user
&& self.host == other.host
&& self.port == other.port
&& self.path == other.path
&& self.query == other.query
&& self.fragment == other.fragment
}
pure fn ne(&&other: Url) -> bool {
!self.eq(other)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Url : Eq {
pure fn eq(other: &Url) -> bool {
self.scheme == (*other).scheme

View File

@ -96,15 +96,6 @@ fn parse_opts(args: &[~str]) -> OptRes {
enum TestResult { TrOk, TrFailed, TrIgnored, }
#[cfg(stage0)]
impl TestResult : Eq {
pure fn eq(&&other: TestResult) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: TestResult) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl TestResult : Eq {
pure fn eq(other: &TestResult) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -37,15 +37,6 @@ extern mod rustrt {
/// A record specifying a time value in seconds and nanoseconds.
type Timespec = {sec: i64, nsec: i32};
#[cfg(stage0)]
impl Timespec : Eq {
pure fn eq(&&other: Timespec) -> bool {
self.sec == other.sec && self.nsec == other.nsec
}
pure fn ne(&&other: Timespec) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Timespec : Eq {
pure fn eq(other: &Timespec) -> bool {
self.sec == (*other).sec && self.nsec == (*other).nsec
@ -101,26 +92,6 @@ type Tm_ = {
tm_nsec: i32, // nanoseconds
};
#[cfg(stage0)]
impl Tm_ : Eq {
pure fn eq(&&other: Tm_) -> bool {
self.tm_sec == other.tm_sec &&
self.tm_min == other.tm_min &&
self.tm_hour == other.tm_hour &&
self.tm_mday == other.tm_mday &&
self.tm_mon == other.tm_mon &&
self.tm_year == other.tm_year &&
self.tm_wday == other.tm_wday &&
self.tm_yday == other.tm_yday &&
self.tm_isdst == other.tm_isdst &&
self.tm_gmtoff == other.tm_gmtoff &&
self.tm_zone == other.tm_zone &&
self.tm_nsec == other.tm_nsec
}
pure fn ne(&&other: Tm_) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Tm_ : Eq {
pure fn eq(other: &Tm_) -> bool {
self.tm_sec == (*other).tm_sec &&
@ -143,13 +114,6 @@ enum Tm {
Tm_(Tm_)
}
#[cfg(stage0)]
impl Tm : Eq {
pure fn eq(&&other: Tm) -> bool { *self == *other }
pure fn ne(&&other: Tm) -> bool { *self != *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Tm : Eq {
pure fn eq(other: &Tm) -> bool { *self == *(*other) }
pure fn ne(other: &Tm) -> bool { *self != *(*other) }

View File

@ -81,15 +81,6 @@ type node_id = int;
#[auto_serialize]
type def_id = {crate: crate_num, node: node_id};
#[cfg(stage0)]
impl def_id: cmp::Eq {
pure fn eq(&&other: def_id) -> bool {
self.crate == other.crate && self.node == other.node
}
pure fn ne(&&other: def_id) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl def_id : cmp::Eq {
pure fn eq(other: &def_id) -> bool {
self.crate == (*other).crate && self.node == (*other).node
@ -138,131 +129,6 @@ enum def {
def_label(node_id)
}
#[cfg(stage0)]
impl def : cmp::Eq {
pure fn eq(&&other: def) -> bool {
match self {
def_fn(e0a, e1a) => {
match other {
def_fn(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
def_static_method(e0a, e1a) => {
match other {
def_static_method(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
def_self(e0a) => {
match other {
def_self(e0b) => e0a == e0b,
_ => false
}
}
def_mod(e0a) => {
match other {
def_mod(e0b) => e0a == e0b,
_ => false
}
}
def_foreign_mod(e0a) => {
match other {
def_foreign_mod(e0b) => e0a == e0b,
_ => false
}
}
def_const(e0a) => {
match other {
def_const(e0b) => e0a == e0b,
_ => false
}
}
def_arg(e0a, e1a) => {
match other {
def_arg(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
def_local(e0a, e1a) => {
match other {
def_local(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
def_variant(e0a, e1a) => {
match other {
def_variant(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
def_ty(e0a) => {
match other {
def_ty(e0b) => e0a == e0b,
_ => false
}
}
def_prim_ty(e0a) => {
match other {
def_prim_ty(e0b) => e0a == e0b,
_ => false
}
}
def_ty_param(e0a, e1a) => {
match other {
def_ty_param(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
def_binding(e0a, e1a) => {
match other {
def_binding(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
def_use(e0a) => {
match other {
def_use(e0b) => e0a == e0b,
_ => false
}
}
def_upvar(e0a, e1a, e2a, e3a) => {
match other {
def_upvar(e0b, e1b, e2b, e3b) =>
e0a == e0b && e1a == e1b && e2a == e2b && e3a == e3b,
_ => false
}
}
def_class(e0a, e1a) => {
match other {
def_class(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
def_typaram_binder(e0a) => {
match other {
def_typaram_binder(e1a) => e0a == e1a,
_ => false
}
}
def_region(e0a) => {
match other {
def_region(e0b) => e0a == e0b,
_ => false
}
}
def_label(e0a) => {
match other {
def_label(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: def) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl def : cmp::Eq {
pure fn eq(other: &def) -> bool {
match self {
@ -464,40 +330,6 @@ impl binding_mode : to_bytes::IterBytes {
}
}
#[cfg(stage0)]
impl binding_mode : cmp::Eq {
pure fn eq(&&other: binding_mode) -> bool {
match self {
bind_by_value => {
match other {
bind_by_value => true,
_ => false
}
}
bind_by_move => {
match other {
bind_by_move => true,
_ => false
}
}
bind_by_ref(e0a) => {
match other {
bind_by_ref(e0b) => e0a == e0b,
_ => false
}
}
bind_by_implicit_ref => {
match other {
bind_by_implicit_ref => true,
_ => false
}
}
}
}
pure fn ne(&&other: binding_mode) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl binding_mode : cmp::Eq {
pure fn eq(other: &binding_mode) -> bool {
match self {
@ -562,15 +394,6 @@ impl mutability : to_bytes::IterBytes {
}
}
#[cfg(stage0)]
impl mutability: cmp::Eq {
pure fn eq(&&other: mutability) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: mutability) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl mutability : cmp::Eq {
pure fn eq(other: &mutability) -> bool {
(self as uint) == ((*other) as uint)
@ -586,15 +409,6 @@ enum proto {
proto_block, // fn&
}
#[cfg(stage0)]
impl proto : cmp::Eq {
pure fn eq(&&other: proto) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: proto) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl proto : cmp::Eq {
pure fn eq(other: &proto) -> bool {
(self as uint) == ((*other) as uint)
@ -649,15 +463,6 @@ enum binop {
gt,
}
#[cfg(stage0)]
impl binop : cmp::Eq {
pure fn eq(&&other: binop) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: binop) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl binop : cmp::Eq {
pure fn eq(other: &binop) -> bool {
(self as uint) == ((*other) as uint)
@ -674,48 +479,6 @@ enum unop {
neg
}
#[cfg(stage0)]
impl unop : cmp::Eq {
pure fn eq(&&other: unop) -> bool {
match self {
box(e0a) => {
match other {
box(e0b) => e0a == e0b,
_ => false
}
}
uniq(e0a) => {
match other {
uniq(e0b) => e0a == e0b,
_ => false
}
}
deref => {
match other {
deref => true,
_ => false
}
}
not => {
match other {
not => true,
_ => false
}
}
neg => {
match other {
neg => true,
_ => false
}
}
}
}
pure fn ne(&&other: unop) -> bool {
!self.eq(other)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl unop : cmp::Eq {
pure fn eq(other: &unop) -> bool {
match self {
@ -776,28 +539,6 @@ impl<T: to_bytes::IterBytes> inferable<T> : to_bytes::IterBytes {
}
}
#[cfg(stage0)]
impl<T:cmp::Eq> inferable<T> : cmp::Eq {
pure fn eq(&&other: inferable<T>) -> bool {
match self {
expl(e0a) => {
match other {
expl(e0b) => e0a == e0b,
_ => false
}
}
infer(e0a) => {
match other {
infer(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: inferable<T>) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<T:cmp::Eq> inferable<T> : cmp::Eq {
pure fn eq(other: &inferable<T>) -> bool {
match self {
@ -829,15 +570,6 @@ impl rmode : to_bytes::IterBytes {
}
#[cfg(stage0)]
impl rmode : cmp::Eq {
pure fn eq(&&other: rmode) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: rmode) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl rmode : cmp::Eq {
pure fn eq(other: &rmode) -> bool {
(self as uint) == ((*other) as uint)
@ -866,28 +598,6 @@ enum stmt_ {
#[auto_serialize]
enum init_op { init_assign, init_move, }
#[cfg(stage0)]
impl init_op : cmp::Eq {
pure fn eq(&&other: init_op) -> bool {
match self {
init_assign => {
match other {
init_assign => true,
_ => false
}
}
init_move => {
match other {
init_move => true,
_ => false
}
}
}
}
pure fn ne(&&other: init_op) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl init_op : cmp::Eq {
pure fn eq(other: &init_op) -> bool {
match self {
@ -938,20 +648,6 @@ type field = spanned<field_>;
#[auto_serialize]
enum blk_check_mode { default_blk, unsafe_blk, }
#[cfg(stage0)]
impl blk_check_mode : cmp::Eq {
pure fn eq(&&other: blk_check_mode) -> bool {
match (self, other) {
(default_blk, default_blk) => true,
(unsafe_blk, unsafe_blk) => true,
(default_blk, _) => false,
(unsafe_blk, _) => false,
}
}
pure fn ne(&&other: blk_check_mode) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl blk_check_mode : cmp::Eq {
pure fn eq(other: &blk_check_mode) -> bool {
match (self, (*other)) {
@ -1171,36 +867,6 @@ enum lit_ {
lit_bool(bool),
}
#[cfg(stage0)]
impl ast::lit_: cmp::Eq {
pure fn eq(&&other: ast::lit_) -> bool {
match (self, other) {
(lit_str(a), lit_str(b)) => a == b,
(lit_int(val_a, ty_a), lit_int(val_b, ty_b)) => {
val_a == val_b && ty_a == ty_b
}
(lit_uint(val_a, ty_a), lit_uint(val_b, ty_b)) => {
val_a == val_b && ty_a == ty_b
}
(lit_int_unsuffixed(a), lit_int_unsuffixed(b)) => a == b,
(lit_float(val_a, ty_a), lit_float(val_b, ty_b)) => {
val_a == val_b && ty_a == ty_b
}
(lit_nil, lit_nil) => true,
(lit_bool(a), lit_bool(b)) => a == b,
(lit_str(_), _) => false,
(lit_int(*), _) => false,
(lit_uint(*), _) => false,
(lit_int_unsuffixed(*), _) => false,
(lit_float(*), _) => false,
(lit_nil, _) => false,
(lit_bool(_), _) => false
}
}
pure fn ne(&&other: ast::lit_) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ast::lit_: cmp::Eq {
pure fn eq(other: &ast::lit_) -> bool {
match (self, *other) {
@ -1263,28 +929,6 @@ impl int_ty : to_bytes::IterBytes {
}
}
#[cfg(stage0)]
impl int_ty: cmp::Eq {
pure fn eq(&&other: int_ty) -> bool {
match (self, other) {
(ty_i, ty_i) => true,
(ty_char, ty_char) => true,
(ty_i8, ty_i8) => true,
(ty_i16, ty_i16) => true,
(ty_i32, ty_i32) => true,
(ty_i64, ty_i64) => true,
(ty_i, _) => false,
(ty_char, _) => false,
(ty_i8, _) => false,
(ty_i16, _) => false,
(ty_i32, _) => false,
(ty_i64, _) => false,
}
}
pure fn ne(&&other: int_ty) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl int_ty : cmp::Eq {
pure fn eq(other: &int_ty) -> bool {
match (self, (*other)) {
@ -1314,26 +958,6 @@ impl uint_ty : to_bytes::IterBytes {
}
}
#[cfg(stage0)]
impl uint_ty: cmp::Eq {
pure fn eq(&&other: uint_ty) -> bool {
match (self, other) {
(ty_u, ty_u) => true,
(ty_u8, ty_u8) => true,
(ty_u16, ty_u16) => true,
(ty_u32, ty_u32) => true,
(ty_u64, ty_u64) => true,
(ty_u, _) => false,
(ty_u8, _) => false,
(ty_u16, _) => false,
(ty_u32, _) => false,
(ty_u64, _) => false
}
}
pure fn ne(&&other: uint_ty) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl uint_ty : cmp::Eq {
pure fn eq(other: &uint_ty) -> bool {
match (self, (*other)) {
@ -1360,18 +984,6 @@ impl float_ty : to_bytes::IterBytes {
(self as u8).iter_bytes(lsb0, f)
}
}
#[cfg(stage0)]
impl float_ty: cmp::Eq {
pure fn eq(&&other: float_ty) -> bool {
match (self, other) {
(ty_f, ty_f) | (ty_f32, ty_f32) | (ty_f64, ty_f64) => true,
(ty_f, _) | (ty_f32, _) | (ty_f64, _) => false
}
}
pure fn ne(&&other: float_ty) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl float_ty : cmp::Eq {
pure fn eq(other: &float_ty) -> bool {
match (self, (*other)) {
@ -1395,46 +1007,6 @@ enum prim_ty {
ty_bool,
}
#[cfg(stage0)]
impl prim_ty : cmp::Eq {
pure fn eq(&&other: prim_ty) -> bool {
match self {
ty_int(e0a) => {
match other {
ty_int(e0b) => e0a == e0b,
_ => false
}
}
ty_uint(e0a) => {
match other {
ty_uint(e0b) => e0a == e0b,
_ => false
}
}
ty_float(e0a) => {
match other {
ty_float(e0b) => e0a == e0b,
_ => false
}
}
ty_str => {
match other {
ty_str => true,
_ => false
}
}
ty_bool => {
match other {
ty_bool => true,
_ => false
}
}
}
}
pure fn ne(&&other: prim_ty) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl prim_ty : cmp::Eq {
pure fn eq(other: &prim_ty) -> bool {
match self {
@ -1507,17 +1079,6 @@ enum ty_ {
// Equality and byte-iter (hashing) can be quite approximate for AST types.
// since we only care about this for normalizing them to "real" types.
#[cfg(stage0)]
impl ty : cmp::Eq {
pure fn eq(&&other: ty) -> bool {
ptr::addr_of(self) == ptr::addr_of(other)
}
pure fn ne(&&other: ty) -> bool {
ptr::addr_of(self) != ptr::addr_of(other)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ty : cmp::Eq {
pure fn eq(other: &ty) -> bool {
ptr::addr_of(self) == ptr::addr_of((*other))
@ -1557,15 +1118,6 @@ impl purity : to_bytes::IterBytes {
}
}
#[cfg(stage0)]
impl purity : cmp::Eq {
pure fn eq(&&other: purity) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: purity) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl purity : cmp::Eq {
pure fn eq(other: &purity) -> bool {
(self as uint) == ((*other) as uint)
@ -1586,20 +1138,6 @@ impl ret_style : to_bytes::IterBytes {
}
}
#[cfg(stage0)]
impl ret_style : cmp::Eq {
pure fn eq(&&other: ret_style) -> bool {
match (self, other) {
(noreturn, noreturn) => true,
(return_val, return_val) => true,
(noreturn, _) => false,
(return_val, _) => false,
}
}
pure fn ne(&&other: ret_style) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ret_style : cmp::Eq {
pure fn eq(other: &ret_style) -> bool {
match (self, (*other)) {
@ -1622,52 +1160,6 @@ enum self_ty_ {
sty_uniq(mutability) // by-unique-pointer self: `~self`
}
#[cfg(stage0)]
impl self_ty_ : cmp::Eq {
pure fn eq(&&other: self_ty_) -> bool {
match self {
sty_static => {
match other {
sty_static => true,
_ => false
}
}
sty_by_ref => {
match other {
sty_by_ref => true,
_ => false
}
}
sty_value => {
match other {
sty_value => true,
_ => false
}
}
sty_region(e0a) => {
match other {
sty_region(e0b) => e0a == e0b,
_ => false
}
}
sty_box(e0a) => {
match other {
sty_box(e0b) => e0a == e0b,
_ => false
}
}
sty_uniq(e0a) => {
match other {
sty_uniq(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: self_ty_) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl self_ty_ : cmp::Eq {
pure fn eq(other: &self_ty_) -> bool {
match self {
@ -1736,15 +1228,6 @@ enum foreign_abi {
#[auto_serialize]
enum foreign_mod_sort { named, anonymous }
#[cfg(stage0)]
impl foreign_mod_sort : cmp::Eq {
pure fn eq(&&other: foreign_mod_sort) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: foreign_mod_sort) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl foreign_mod_sort : cmp::Eq {
pure fn eq(other: &foreign_mod_sort) -> bool {
(self as uint) == ((*other) as uint)
@ -1752,22 +1235,6 @@ impl foreign_mod_sort : cmp::Eq {
pure fn ne(other: &foreign_mod_sort) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl foreign_abi : cmp::Eq {
pure fn eq(&&other: foreign_abi) -> bool {
match (self, other) {
(foreign_abi_rust_intrinsic, foreign_abi_rust_intrinsic) => true,
(foreign_abi_cdecl, foreign_abi_cdecl) => true,
(foreign_abi_stdcall, foreign_abi_stdcall) => true,
(foreign_abi_rust_intrinsic, _) => false,
(foreign_abi_cdecl, _) => false,
(foreign_abi_stdcall, _) => false,
}
}
pure fn ne(&&other: foreign_abi) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl foreign_abi : cmp::Eq {
pure fn eq(other: &foreign_abi) -> bool {
match (self, (*other)) {
@ -1817,15 +1284,6 @@ type path_list_ident = spanned<path_list_ident_>;
#[auto_serialize]
enum namespace { module_ns, type_value_ns }
#[cfg(stage0)]
impl namespace : cmp::Eq {
pure fn eq(&&other: namespace) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: namespace) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl namespace : cmp::Eq {
pure fn eq(other: &namespace) -> bool {
(self as uint) == ((*other) as uint)
@ -1874,15 +1332,6 @@ type attribute = spanned<attribute_>;
#[auto_serialize]
enum attr_style { attr_outer, attr_inner, }
#[cfg(stage0)]
impl attr_style : cmp::Eq {
pure fn eq(&&other: attr_style) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: attr_style) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl attr_style : cmp::Eq {
pure fn eq(other: &attr_style) -> bool {
(self as uint) == ((*other) as uint)
@ -1909,22 +1358,6 @@ type trait_ref = {path: @path, ref_id: node_id, impl_id: node_id};
#[auto_serialize]
enum visibility { public, private, inherited }
#[cfg(stage0)]
impl visibility : cmp::Eq {
pure fn eq(&&other: visibility) -> bool {
match (self, other) {
(public, public) => true,
(private, private) => true,
(inherited, inherited) => true,
(public, _) => false,
(private, _) => false,
(inherited, _) => false,
}
}
pure fn ne(&&other: visibility) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl visibility : cmp::Eq {
pure fn eq(other: &visibility) -> bool {
match (self, (*other)) {
@ -2002,20 +1435,6 @@ impl class_mutability : to_bytes::IterBytes {
}
}
#[cfg(stage0)]
impl class_mutability : cmp::Eq {
pure fn eq(&&other: class_mutability) -> bool {
match (self, other) {
(class_mutable, class_mutable) => true,
(class_immutable, class_immutable) => true,
(class_mutable, _) => false,
(class_immutable, _) => false,
}
}
pure fn ne(&&other: class_mutability) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl class_mutability : cmp::Eq {
pure fn eq(other: &class_mutability) -> bool {
match (self, (*other)) {

View File

@ -11,28 +11,6 @@ enum path_elt {
path_name(ident)
}
#[cfg(stage0)]
impl path_elt : cmp::Eq {
pure fn eq(&&other: path_elt) -> bool {
match self {
path_mod(e0a) => {
match other {
path_mod(e0b) => e0a == e0b,
_ => false
}
}
path_name(e0a) => {
match other {
path_name(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: path_elt) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl path_elt : cmp::Eq {
pure fn eq(other: &path_elt) -> bool {
match self {

View File

@ -337,15 +337,6 @@ enum inline_attr {
ia_never,
}
#[cfg(stage0)]
impl inline_attr : cmp::Eq {
pure fn eq(&&other: inline_attr) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: inline_attr) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl inline_attr : cmp::Eq {
pure fn eq(other: &inline_attr) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -32,15 +32,6 @@ type filename = ~str;
type file_pos = {ch: uint, byte: uint};
#[cfg(stage0)]
impl file_pos: cmp::Eq {
pure fn eq(&&other: file_pos) -> bool {
self.ch == other.ch && self.byte == other.byte
}
pure fn ne(&&other: file_pos) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl file_pos : cmp::Eq {
pure fn eq(other: &file_pos) -> bool {
self.ch == (*other).ch && self.byte == (*other).byte
@ -180,15 +171,6 @@ type expn_info = Option<@expn_info_>;
type span = {lo: uint, hi: uint, expn_info: expn_info};
#[cfg(stage0)]
impl span : cmp::Eq {
pure fn eq(&&other: span) -> bool {
return self.lo == other.lo && self.hi == other.hi;
}
pure fn ne(&&other: span) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl span : cmp::Eq {
pure fn eq(other: &span) -> bool {
return self.lo == (*other).lo && self.hi == (*other).hi;

View File

@ -146,15 +146,6 @@ enum level {
note,
}
#[cfg(stage0)]
impl level : cmp::Eq {
pure fn eq(&&other: level) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: level) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl level : cmp::Eq {
pure fn eq(other: &level) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -5,20 +5,6 @@ use ast_builder::{path, append_types};
enum direction { send, recv }
#[cfg(stage0)]
impl direction : cmp::Eq {
pure fn eq(&&other: direction) -> bool {
match (self, other) {
(send, send) => true,
(recv, recv) => true,
(send, _) => false,
(recv, _) => false,
}
}
pure fn ne(&&other: direction) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl direction : cmp::Eq {
pure fn eq(other: &direction) -> bool {
match (self, (*other)) {

View File

@ -17,17 +17,6 @@ enum cmnt_style {
blank_line, // Just a manual blank line "\n\n", for layout
}
#[cfg(stage0)]
impl cmnt_style : cmp::Eq {
pure fn eq(&&other: cmnt_style) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: cmnt_style) -> bool {
(self as uint) != (other as uint)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl cmnt_style : cmp::Eq {
pure fn eq(other: &cmnt_style) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -25,17 +25,6 @@ pub enum ObsoleteSyntax {
ObsoleteModeInFnType
}
#[cfg(stage0)]
impl ObsoleteSyntax : cmp::Eq {
pure fn eq(&&other: ObsoleteSyntax) -> bool {
self as uint == other as uint
}
pure fn ne(&&other: ObsoleteSyntax) -> bool {
!self.eq(other)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ObsoleteSyntax : cmp::Eq {
pure fn eq(other: &ObsoleteSyntax) -> bool {
self as uint == (*other) as uint

View File

@ -3657,15 +3657,6 @@ impl parser {
}
}
#[cfg(stage0)]
impl restriction : cmp::Eq {
pure fn eq(&&other: restriction) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: restriction) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl restriction : cmp::Eq {
pure fn eq(other: &restriction) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -436,15 +436,6 @@ fn reserved_keyword_table() -> HashMap<~str, ()> {
words
}
#[cfg(stage0)]
impl binop : cmp::Eq {
pure fn eq(&&other: binop) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: binop) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl binop : cmp::Eq {
pure fn eq(other: &binop) -> bool {
(self as uint) == ((*other) as uint)
@ -452,274 +443,6 @@ impl binop : cmp::Eq {
pure fn ne(other: &binop) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl token : cmp::Eq {
pure fn eq(&&other: token) -> bool {
match self {
EQ => {
match other {
EQ => true,
_ => false
}
}
LT => {
match other {
LT => true,
_ => false
}
}
LE => {
match other {
LE => true,
_ => false
}
}
EQEQ => {
match other {
EQEQ => true,
_ => false
}
}
NE => {
match other {
NE => true,
_ => false
}
}
GE => {
match other {
GE => true,
_ => false
}
}
GT => {
match other {
GT => true,
_ => false
}
}
ANDAND => {
match other {
ANDAND => true,
_ => false
}
}
OROR => {
match other {
OROR => true,
_ => false
}
}
NOT => {
match other {
NOT => true,
_ => false
}
}
TILDE => {
match other {
TILDE => true,
_ => false
}
}
BINOP(e0a) => {
match other {
BINOP(e0b) => e0a == e0b,
_ => false
}
}
BINOPEQ(e0a) => {
match other {
BINOPEQ(e0b) => e0a == e0b,
_ => false
}
}
AT => {
match other {
AT => true,
_ => false
}
}
DOT => {
match other {
DOT => true,
_ => false
}
}
DOTDOT => {
match other {
DOTDOT => true,
_ => false
}
}
ELLIPSIS => {
match other {
ELLIPSIS => true,
_ => false
}
}
COMMA => {
match other {
COMMA => true,
_ => false
}
}
SEMI => {
match other {
SEMI => true,
_ => false
}
}
COLON => {
match other {
COLON => true,
_ => false
}
}
MOD_SEP => {
match other {
MOD_SEP => true,
_ => false
}
}
RARROW => {
match other {
RARROW => true,
_ => false
}
}
LARROW => {
match other {
LARROW => true,
_ => false
}
}
DARROW => {
match other {
DARROW => true,
_ => false
}
}
FAT_ARROW => {
match other {
FAT_ARROW => true,
_ => false
}
}
LPAREN => {
match other {
LPAREN => true,
_ => false
}
}
RPAREN => {
match other {
RPAREN => true,
_ => false
}
}
LBRACKET => {
match other {
LBRACKET => true,
_ => false
}
}
RBRACKET => {
match other {
RBRACKET => true,
_ => false
}
}
LBRACE => {
match other {
LBRACE => true,
_ => false
}
}
RBRACE => {
match other {
RBRACE => true,
_ => false
}
}
POUND => {
match other {
POUND => true,
_ => false
}
}
DOLLAR => {
match other {
DOLLAR => true,
_ => false
}
}
LIT_INT(e0a, e1a) => {
match other {
LIT_INT(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
LIT_UINT(e0a, e1a) => {
match other {
LIT_UINT(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
LIT_INT_UNSUFFIXED(e0a) => {
match other {
LIT_INT_UNSUFFIXED(e0b) => e0a == e0b,
_ => false
}
}
LIT_FLOAT(e0a, e1a) => {
match other {
LIT_FLOAT(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
LIT_STR(e0a) => {
match other {
LIT_STR(e0b) => e0a == e0b,
_ => false
}
}
IDENT(e0a, e1a) => {
match other {
IDENT(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
UNDERSCORE => {
match other {
UNDERSCORE => true,
_ => false
}
}
INTERPOLATED(_) => {
match other {
INTERPOLATED(_) => true,
_ => false
}
}
DOC_COMMENT(e0a) => {
match other {
DOC_COMMENT(e0b) => e0a == e0b,
_ => false
}
}
EOF => {
match other {
EOF => true,
_ => false
}
}
}
}
pure fn ne(&&other: token) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl token : cmp::Eq {
pure fn eq(other: &token) -> bool {
match self {

View File

@ -55,20 +55,6 @@ use dvec::DVec;
*/
enum breaks { consistent, inconsistent, }
#[cfg(stage0)]
impl breaks : cmp::Eq {
pure fn eq(&&other: breaks) -> bool {
match (self, other) {
(consistent, consistent) => true,
(inconsistent, inconsistent) => true,
(consistent, _) => false,
(inconsistent, _) => false,
}
}
pure fn ne(&&other: breaks) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl breaks : cmp::Eq {
pure fn eq(other: &breaks) -> bool {
match (self, (*other)) {

View File

@ -26,15 +26,6 @@ enum output_type {
output_type_exe,
}
#[cfg(stage0)]
impl output_type : cmp::Eq {
pure fn eq(&&other: output_type) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: output_type) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl output_type : cmp::Eq {
pure fn eq(other: &output_type) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -138,15 +138,6 @@ enum compile_upto {
cu_everything,
}
#[cfg(stage0)]
impl compile_upto : cmp::Eq {
pure fn eq(&&other: compile_upto) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: compile_upto) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl compile_upto : cmp::Eq {
pure fn eq(other: &compile_upto) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -207,15 +207,6 @@ enum monitor_msg {
done,
}
#[cfg(stage0)]
impl monitor_msg : cmp::Eq {
pure fn eq(&&other: monitor_msg) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: monitor_msg) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl monitor_msg : cmp::Eq {
pure fn eq(other: &monitor_msg) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -12,15 +12,6 @@ use middle::lint;
enum os { os_win32, os_macos, os_linux, os_freebsd, }
#[cfg(stage0)]
impl os : cmp::Eq {
pure fn eq(&&other: os) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: os) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl os : cmp::Eq {
pure fn eq(other: &os) -> bool {
(self as uint) == ((*other) as uint)
@ -30,15 +21,6 @@ impl os : cmp::Eq {
enum arch { arch_x86, arch_x86_64, arch_arm, }
#[cfg(stage0)]
impl arch: cmp::Eq {
pure fn eq(&&other: arch) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: arch) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl arch : cmp::Eq {
pure fn eq(other: &arch) -> bool {
(self as uint) == ((*other) as uint)
@ -112,15 +94,6 @@ enum OptLevel {
Aggressive // -O3
}
#[cfg(stage0)]
impl OptLevel : cmp::Eq {
pure fn eq(&&other: OptLevel) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: OptLevel) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl OptLevel : cmp::Eq {
pure fn eq(other: &OptLevel) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -128,48 +128,6 @@ enum TypeKind {
X86_MMX = 15
}
#[cfg(stage0)]
impl TypeKind : cmp::Eq {
pure fn eq(&&other: TypeKind) -> bool {
match (self, other) {
(Void, Void) => true,
(Half, Half) => true,
(Float, Float) => true,
(Double, Double) => true,
(X86_FP80, X86_FP80) => true,
(FP128, FP128) => true,
(PPC_FP128, PPC_FP128) => true,
(Label, Label) => true,
(Integer, Integer) => true,
(Function, Function) => true,
(Struct, Struct) => true,
(Array, Array) => true,
(Pointer, Pointer) => true,
(Vector, Vector) => true,
(Metadata, Metadata) => true,
(X86_MMX, X86_MMX) => true,
(Void, _) => false,
(Half, _) => false,
(Float, _) => false,
(Double, _) => false,
(X86_FP80, _) => false,
(FP128, _) => false,
(PPC_FP128, _) => false,
(Label, _) => false,
(Integer, _) => false,
(Function, _) => false,
(Struct, _) => false,
(Array, _) => false,
(Pointer, _) => false,
(Vector, _) => false,
(Metadata, _) => false,
(X86_MMX, _) => false,
}
}
pure fn ne(&&other: TypeKind) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl TypeKind : cmp::Eq {
pure fn eq(other: &TypeKind) -> bool {
match (self, (*other)) {

View File

@ -129,15 +129,6 @@ enum Family {
InheritedField // N
}
#[cfg(stage0)]
impl Family : cmp::Eq {
pure fn eq(&&other: Family) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: Family) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Family : cmp::Eq {
pure fn eq(other: &Family) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -323,53 +323,6 @@ enum bckerr_code {
err_out_of_scope(ty::region, ty::region) // superscope, subscope
}
#[cfg(stage0)]
impl bckerr_code : cmp::Eq {
pure fn eq(&&other: bckerr_code) -> bool {
match self {
err_mut_uniq => {
match other {
err_mut_uniq => true,
_ => false
}
}
err_mut_variant => {
match other {
err_mut_variant => true,
_ => false
}
}
err_root_not_permitted => {
match other {
err_root_not_permitted => true,
_ => false
}
}
err_mutbl(e0a) => {
match other {
err_mutbl(e0b) => e0a == e0b,
_ => false
}
}
err_out_of_root_scope(e0a, e1a) => {
match other {
err_out_of_root_scope(e0b, e1b) =>
e0a == e0b && e1a == e1b,
_ => false
}
}
err_out_of_scope(e0a, e1a) => {
match other {
err_out_of_scope(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
}
}
pure fn ne(&&other: bckerr_code) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl bckerr_code : cmp::Eq {
pure fn eq(other: &bckerr_code) -> bool {
match self {
@ -419,15 +372,6 @@ impl bckerr_code : cmp::Eq {
// that caused it
type bckerr = {cmt: cmt, code: bckerr_code};
#[cfg(stage0)]
impl bckerr : cmp::Eq {
pure fn eq(&&other: bckerr) -> bool {
self.cmt == other.cmt && self.code == other.code
}
pure fn ne(&&other: bckerr) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl bckerr : cmp::Eq {
pure fn eq(other: &bckerr) -> bool {
self.cmt == (*other).cmt && self.code == (*other).code
@ -461,17 +405,6 @@ fn save_and_restore<T:Copy,U>(&save_and_restore_t: T, f: fn() -> U) -> U {
/// Creates and returns a new root_map
#[cfg(stage0)]
impl root_map_key : cmp::Eq {
pure fn eq(&&other: root_map_key) -> bool {
self.id == other.id && self.derefs == other.derefs
}
pure fn ne(&&other: root_map_key) -> bool {
! (self == other)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl root_map_key : cmp::Eq {
pure fn eq(other: &root_map_key) -> bool {
self.id == (*other).id && self.derefs == (*other).derefs

View File

@ -36,28 +36,6 @@ enum purity_cause {
pc_cmt(bckerr)
}
#[cfg(stage0)]
impl purity_cause : cmp::Eq {
pure fn eq(&&other: purity_cause) -> bool {
match self {
pc_pure_fn => {
match other {
pc_pure_fn => true,
_ => false
}
}
pc_cmt(e0a) => {
match other {
pc_cmt(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: purity_cause) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl purity_cause : cmp::Eq {
pure fn eq(other: &purity_cause) -> bool {
match self {
@ -100,15 +78,6 @@ enum assignment_type {
at_swap
}
#[cfg(stage0)]
impl assignment_type : cmp::Eq {
pure fn eq(&&other: assignment_type) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: assignment_type) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl assignment_type : cmp::Eq {
pure fn eq(other: &assignment_type) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -124,25 +124,6 @@ enum ctor {
range(const_val, const_val),
}
#[cfg(stage0)]
impl ctor: cmp::Eq {
pure fn eq(&&other: ctor) -> bool {
match (self, other) {
(single, single) => true,
(variant(did_self), variant(did_other)) => did_self == did_other,
(val(cv_self), val(cv_other)) => cv_self == cv_other,
(range(cv0_self, cv1_self), range(cv0_other, cv1_other)) => {
cv0_self == cv0_other && cv1_self == cv1_other
}
(single, _) | (variant(_), _) | (val(_), _) | (range(*), _) => {
false
}
}
}
pure fn ne(&&other: ctor) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ctor : cmp::Eq {
pure fn eq(other: &ctor) -> bool {
match (self, (*other)) {

View File

@ -189,23 +189,6 @@ enum const_val {
const_bool(bool)
}
#[cfg(stage0)]
impl const_val: cmp::Eq {
pure fn eq(&&other: const_val) -> bool {
match (self, other) {
(const_float(a), const_float(b)) => a == b,
(const_int(a), const_int(b)) => a == b,
(const_uint(a), const_uint(b)) => a == b,
(const_str(a), const_str(b)) => a == b,
(const_bool(a), const_bool(b)) => a == b,
(const_float(_), _) | (const_int(_), _) | (const_uint(_), _) |
(const_str(_), _) | (const_bool(_), _) => false
}
}
pure fn ne(&&other: const_val) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl const_val : cmp::Eq {
pure fn eq(other: &const_val) -> bool {
match (self, (*other)) {

View File

@ -66,15 +66,6 @@ enum lint {
// dead_assignment
}
#[cfg(stage0)]
impl lint : cmp::Eq {
pure fn eq(&&other: lint) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: lint) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl lint : cmp::Eq {
pure fn eq(other: &lint) -> bool {
(self as uint) == ((*other) as uint)
@ -95,15 +86,6 @@ enum level {
allow, warn, deny, forbid
}
#[cfg(stage0)]
impl level : cmp::Eq {
pure fn eq(&&other: level) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: level) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl level : cmp::Eq {
pure fn eq(other: &level) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -127,25 +127,11 @@ type last_use_map = HashMap<node_id, @DVec<node_id>>;
enum Variable = uint;
enum LiveNode = uint;
#[cfg(stage0)]
impl Variable : cmp::Eq {
pure fn eq(&&other: Variable) -> bool { *self == *other }
pure fn ne(&&other: Variable) -> bool { *self != *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Variable : cmp::Eq {
pure fn eq(other: &Variable) -> bool { *self == *(*other) }
pure fn ne(other: &Variable) -> bool { *self != *(*other) }
}
#[cfg(stage0)]
impl LiveNode : cmp::Eq {
pure fn eq(&&other: LiveNode) -> bool { *self == *other }
pure fn ne(&&other: LiveNode) -> bool { *self != *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl LiveNode : cmp::Eq {
pure fn eq(other: &LiveNode) -> bool { *self == *(*other) }
pure fn ne(other: &LiveNode) -> bool { *self != *(*other) }
@ -158,40 +144,6 @@ enum LiveNodeKind {
ExitNode
}
#[cfg(stage0)]
impl LiveNodeKind : cmp::Eq {
pure fn eq(&&other: LiveNodeKind) -> bool {
match self {
FreeVarNode(e0a) => {
match other {
FreeVarNode(e0b) => e0a == e0b,
_ => false
}
}
ExprNode(e0a) => {
match other {
ExprNode(e0b) => e0a == e0b,
_ => false
}
}
VarDefNode(e0a) => {
match other {
VarDefNode(e0b) => e0a == e0b,
_ => false
}
}
ExitNode => {
match other {
ExitNode => true,
_ => false
}
}
}
}
pure fn ne(&&other: LiveNodeKind) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl LiveNodeKind : cmp::Eq {
pure fn eq(other: &LiveNodeKind) -> bool {
match self {

View File

@ -55,71 +55,6 @@ enum categorization {
cat_discr(cmt, ast::node_id), // match discriminant (see preserve())
}
#[cfg(stage0)]
impl categorization : cmp::Eq {
pure fn eq(&&other: categorization) -> bool {
match self {
cat_rvalue => {
match other {
cat_rvalue => true,
_ => false
}
}
cat_special(e0a) => {
match other {
cat_special(e0b) => e0a == e0b,
_ => false
}
}
cat_local(e0a) => {
match other {
cat_local(e0b) => e0a == e0b,
_ => false
}
}
cat_binding(e0a) => {
match other {
cat_binding(e0b) => e0a == e0b,
_ => false
}
}
cat_arg(e0a) => {
match other {
cat_arg(e0b) => e0a == e0b,
_ => false
}
}
cat_stack_upvar(e0a) => {
match other {
cat_stack_upvar(e0b) => e0a == e0b,
_ => false
}
}
cat_deref(e0a, e1a, e2a) => {
match other {
cat_deref(e0b, e1b, e2b) =>
e0a == e0b && e1a == e1b && e2a == e2b,
_ => false
}
}
cat_comp(e0a, e1a) => {
match other {
cat_comp(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
cat_discr(e0a, e1a) => {
match other {
cat_discr(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
}
}
pure fn ne(&&other: categorization) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl categorization : cmp::Eq {
pure fn eq(other: &categorization) -> bool {
match self {
@ -191,40 +126,6 @@ enum ptr_kind {
unsafe_ptr
}
#[cfg(stage0)]
impl ptr_kind : cmp::Eq {
pure fn eq(&&other: ptr_kind) -> bool {
match self {
uniq_ptr => {
match other {
uniq_ptr => true,
_ => false
}
}
gc_ptr => {
match other {
gc_ptr => true,
_ => false
}
}
region_ptr(e0a) => {
match other {
region_ptr(e0b) => e0a == e0b,
_ => false
}
}
unsafe_ptr => {
match other {
unsafe_ptr => true,
_ => false
}
}
}
}
pure fn ne(&&other: ptr_kind) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ptr_kind : cmp::Eq {
pure fn eq(other: &ptr_kind) -> bool {
match self {
@ -268,40 +169,6 @@ enum comp_kind {
ast::mutability) // mutability of vec content
}
#[cfg(stage0)]
impl comp_kind : cmp::Eq {
pure fn eq(&&other: comp_kind) -> bool {
match self {
comp_tuple => {
match other {
comp_tuple => true,
_ => false
}
}
comp_variant(e0a) => {
match other {
comp_variant(e0b) => e0a == e0b,
_ => false
}
}
comp_field(e0a, e1a) => {
match other {
comp_field(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
comp_index(e0a, e1a) => {
match other {
comp_index(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
}
}
pure fn ne(&&other: comp_kind) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl comp_kind : cmp::Eq {
pure fn eq(other: &comp_kind) -> bool {
match self {
@ -342,15 +209,6 @@ enum special_kind {
sk_heap_upvar
}
#[cfg(stage0)]
impl special_kind : cmp::Eq {
pure fn eq(&&other: special_kind) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: special_kind) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl special_kind : cmp::Eq {
pure fn eq(other: &special_kind) -> bool {
(self as uint) == ((*other) as uint)
@ -370,20 +228,6 @@ type cmt_ = {id: ast::node_id, // id of expr/pat producing this value
type cmt = @cmt_;
#[cfg(stage0)]
impl cmt_ : cmp::Eq {
pure fn eq(&&other: cmt_) -> bool {
self.id == other.id &&
self.span == other.span &&
self.cat == other.cat &&
self.lp == other.lp &&
self.mutbl == other.mutbl &&
self.ty == other.ty
}
pure fn ne(&&other: cmt_) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl cmt_ : cmp::Eq {
pure fn eq(other: &cmt_) -> bool {
self.id == (*other).id &&
@ -406,40 +250,6 @@ enum loan_path {
lp_comp(@loan_path, comp_kind)
}
#[cfg(stage0)]
impl loan_path : cmp::Eq {
pure fn eq(&&other: loan_path) -> bool {
match self {
lp_local(e0a) => {
match other {
lp_local(e0b) => e0a == e0b,
_ => false
}
}
lp_arg(e0a) => {
match other {
lp_arg(e0b) => e0a == e0b,
_ => false
}
}
lp_deref(e0a, e1a) => {
match other {
lp_deref(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
lp_comp(e0a, e1a) => {
match other {
lp_comp(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
}
}
pure fn ne(&&other: loan_path) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl loan_path : cmp::Eq {
pure fn eq(other: &loan_path) -> bool {
match self {

View File

@ -373,15 +373,6 @@ type region_paramd_items = HashMap<ast::node_id, region_variance>;
type region_dep = {ambient_variance: region_variance, id: ast::node_id};
type dep_map = HashMap<ast::node_id, @DVec<region_dep>>;
#[cfg(stage0)]
impl region_dep: cmp::Eq {
pure fn eq(&&other: region_dep) -> bool {
self.ambient_variance == other.ambient_variance && self.id == other.id
}
pure fn ne(&&other: region_dep) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl region_dep : cmp::Eq {
pure fn eq(other: &region_dep) -> bool {
self.ambient_variance == (*other).ambient_variance &&

View File

@ -106,15 +106,6 @@ enum PatternBindingMode {
IrrefutableMode
}
#[cfg(stage0)]
impl PatternBindingMode : cmp::Eq {
pure fn eq(&&other: PatternBindingMode) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: PatternBindingMode) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl PatternBindingMode : cmp::Eq {
pure fn eq(other: &PatternBindingMode) -> bool {
(self as uint) == ((*other) as uint)
@ -156,15 +147,6 @@ enum Mutability {
Immutable
}
#[cfg(stage0)]
impl Mutability : cmp::Eq {
pure fn eq(&&other: Mutability) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: Mutability) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Mutability : cmp::Eq {
pure fn eq(other: &Mutability) -> bool {
(self as uint) == ((*other) as uint)
@ -200,15 +182,6 @@ enum ImportDirectiveNS {
AnyNS
}
#[cfg(stage0)]
impl ImportDirectiveNS : cmp::Eq {
pure fn eq(&&other: ImportDirectiveNS) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: ImportDirectiveNS) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ImportDirectiveNS : cmp::Eq {
pure fn eq(other: &ImportDirectiveNS) -> bool {
(self as uint) == ((*other) as uint)
@ -305,15 +278,6 @@ enum XrayFlag {
Xray //< Private items can be accessed.
}
#[cfg(stage0)]
impl XrayFlag : cmp::Eq {
pure fn eq(&&other: XrayFlag) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: XrayFlag) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl XrayFlag : cmp::Eq {
pure fn eq(other: &XrayFlag) -> bool {
(self as uint) == ((*other) as uint)
@ -326,15 +290,6 @@ enum AllowCapturingSelfFlag {
DontAllowCapturingSelf, //< The "self" definition cannot be captured.
}
#[cfg(stage0)]
impl AllowCapturingSelfFlag : cmp::Eq {
pure fn eq(&&other: AllowCapturingSelfFlag) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: AllowCapturingSelfFlag) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl AllowCapturingSelfFlag : cmp::Eq {
pure fn eq(other: &AllowCapturingSelfFlag) -> bool {
(self as uint) == ((*other) as uint)
@ -548,15 +503,6 @@ enum Privacy {
Public
}
#[cfg(stage0)]
impl Privacy : cmp::Eq {
pure fn eq(&&other: Privacy) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: Privacy) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Privacy : cmp::Eq {
pure fn eq(other: &Privacy) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -675,15 +675,6 @@ fn pick_col(m: &[@Match]) -> uint {
enum branch_kind { no_branch, single, switch, compare, }
#[cfg(stage0)]
impl branch_kind : cmp::Eq {
pure fn eq(&&other: branch_kind) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: branch_kind) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl branch_kind : cmp::Eq {
pure fn eq(other: &branch_kind) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -281,28 +281,6 @@ enum cleanup {
clean_temp(ValueRef, fn@(block) -> block, cleantype),
}
#[cfg(stage0)]
impl cleantype : cmp::Eq {
pure fn eq(&&other: cleantype) -> bool {
match self {
normal_exit_only => {
match other {
normal_exit_only => true,
_ => false
}
}
normal_exit_and_unwind => {
match other {
normal_exit_and_unwind => true,
_ => false
}
}
}
}
pure fn ne(&&other: cleantype) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl cleantype : cmp::Eq {
pure fn eq(other: &cleantype) -> bool {
match self {
@ -1135,28 +1113,6 @@ type mono_id_ = {def: ast::def_id, params: ~[mono_param_id]};
type mono_id = @mono_id_;
#[cfg(stage0)]
impl mono_param_id: cmp::Eq {
pure fn eq(&&other: mono_param_id) -> bool {
match (self, other) {
(mono_precise(ty_a, ids_a), mono_precise(ty_b, ids_b)) => {
ty_a == ty_b && ids_a == ids_b
}
(mono_any, mono_any) => true,
(mono_repr(size_a, align_a, is_float_a, mode_a),
mono_repr(size_b, align_b, is_float_b, mode_b)) => {
size_a == size_b && align_a == align_b &&
is_float_a == is_float_b && mode_a == mode_b
}
(mono_precise(*), _) => false,
(mono_any, _) => false,
(mono_repr(*), _) => false
}
}
pure fn ne(&&other: mono_param_id) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl mono_param_id : cmp::Eq {
pure fn eq(other: &mono_param_id) -> bool {
match (self, (*other)) {
@ -1177,15 +1133,6 @@ impl mono_param_id : cmp::Eq {
pure fn ne(other: &mono_param_id) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl mono_id_: cmp::Eq {
pure fn eq(&&other: mono_id_) -> bool {
return self.def == other.def && self.params == other.params;
}
pure fn ne(&&other: mono_id_) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl mono_id_ : cmp::Eq {
pure fn eq(other: &mono_id_) -> bool {
return self.def == (*other).def && self.params == (*other).params;

View File

@ -138,16 +138,6 @@ impl DatumMode {
}
}
#[cfg(stage0)]
impl DatumMode: cmp::Eq {
pure fn eq(&&other: DatumMode) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: DatumMode) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl DatumMode: cmp::Eq {
pure fn eq(other: &DatumMode) -> bool {
self as uint == (*other as uint)
@ -776,20 +766,6 @@ impl DatumBlock {
}
}
#[cfg(stage0)]
impl CopyAction : cmp::Eq {
pure fn eq(&&other: CopyAction) -> bool {
match (self, other) {
(INIT, INIT) => true,
(DROP_EXISTING, DROP_EXISTING) => true,
(INIT, _) => false,
(DROP_EXISTING, _) => false,
}
}
pure fn ne(&&other: CopyAction) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl CopyAction : cmp::Eq {
pure fn eq(other: &CopyAction) -> bool {
match (self, (*other)) {

View File

@ -147,20 +147,6 @@ impl Dest {
}
}
#[cfg(stage0)]
impl Dest : cmp::Eq {
pure fn eq(&&other: Dest) -> bool {
match (self, other) {
(SaveIn(e0a), SaveIn(e0b)) => e0a == e0b,
(Ignore, Ignore) => true,
(SaveIn(*), _) => false,
(Ignore, _) => false,
}
}
pure fn ne(&&other: Dest) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Dest : cmp::Eq {
pure fn eq(other: &Dest) -> bool {
match (self, (*other)) {
@ -1366,26 +1352,6 @@ enum cast_kind {
cast_other,
}
#[cfg(stage0)]
impl cast_kind : cmp::Eq {
pure fn eq(&&other: cast_kind) -> bool {
match (self, other) {
(cast_pointer, cast_pointer) => true,
(cast_integral, cast_integral) => true,
(cast_float, cast_float) => true,
(cast_enum, cast_enum) => true,
(cast_other, cast_other) => true,
(cast_pointer, _) => false,
(cast_integral, _) => false,
(cast_float, _) => false,
(cast_enum, _) => false,
(cast_other, _) => false,
}
}
pure fn ne(&&other: cast_kind) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl cast_kind : cmp::Eq {
pure fn eq(other: &cast_kind) -> bool {
match (self, (*other)) {

View File

@ -40,15 +40,6 @@ enum x86_64_reg_class {
memory_class
}
#[cfg(stage0)]
impl x86_64_reg_class: cmp::Eq {
pure fn eq(&&other: x86_64_reg_class) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: x86_64_reg_class) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl x86_64_reg_class : cmp::Eq {
pure fn eq(other: &x86_64_reg_class) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -26,24 +26,6 @@ type nominal_id_ = {did: ast::def_id, parent_id: Option<ast::def_id>,
tps: ~[ty::t]};
type nominal_id = @nominal_id_;
#[cfg(stage0)]
impl nominal_id_ : core::cmp::Eq {
pure fn eq(&&other: nominal_id_) -> bool {
if self.did != other.did ||
self.parent_id != other.parent_id {
false
} else {
do vec::all2(self.tps, other.tps) |m_tp, n_tp| {
ty::type_id(m_tp) == ty::type_id(n_tp)
}
}
}
pure fn ne(&&other: nominal_id_) -> bool {
! (self == other)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl nominal_id_ : core::cmp::Eq {
pure fn eq(other: &nominal_id_) -> bool {
if self.did != other.did ||

View File

@ -235,19 +235,6 @@ type field_ty = {
type creader_cache_key = {cnum: int, pos: uint, len: uint};
type creader_cache = HashMap<creader_cache_key, t>;
#[cfg(stage0)]
impl creader_cache_key : cmp::Eq {
pure fn eq(&&other: creader_cache_key) -> bool {
self.cnum == other.cnum &&
self.pos == other.pos &&
self.len == other.len
}
pure fn ne(&&other: creader_cache_key) -> bool {
!(self == other)
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl creader_cache_key : cmp::Eq {
pure fn eq(other: &creader_cache_key) -> bool {
self.cnum == (*other).cnum &&
@ -267,15 +254,6 @@ impl creader_cache_key : to_bytes::IterBytes {
type intern_key = {sty: sty, o_def_id: Option<ast::def_id>};
#[cfg(stage0)]
impl intern_key: cmp::Eq {
pure fn eq(&&other: intern_key) -> bool {
self.sty == other.sty && self.o_def_id == other.o_def_id
}
pure fn ne(&&other: intern_key) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl intern_key : cmp::Eq {
pure fn eq(other: &intern_key) -> bool {
self.sty == (*other).sty && self.o_def_id == (*other).o_def_id
@ -300,22 +278,6 @@ type opt_region_variance = Option<region_variance>;
#[auto_serialize]
enum region_variance { rv_covariant, rv_invariant, rv_contravariant }
#[cfg(stage0)]
impl region_variance: cmp::Eq {
pure fn eq(&&other: region_variance) -> bool {
match (self, other) {
(rv_covariant, rv_covariant) => true,
(rv_invariant, rv_invariant) => true,
(rv_contravariant, rv_contravariant) => true,
(rv_covariant, _) => false,
(rv_invariant, _) => false,
(rv_contravariant, _) => false
}
}
pure fn ne(&&other: region_variance) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl region_variance : cmp::Eq {
pure fn eq(other: &region_variance) -> bool {
match (self, (*other)) {
@ -448,15 +410,6 @@ impl closure_kind : to_bytes::IterBytes {
}
}
#[cfg(stage0)]
impl closure_kind : cmp::Eq {
pure fn eq(&&other: closure_kind) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: closure_kind) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl closure_kind : cmp::Eq {
pure fn eq(other: &closure_kind) -> bool {
(self as uint) == ((*other) as uint)
@ -481,28 +434,6 @@ impl fn_proto : to_bytes::IterBytes {
}
}
#[cfg(stage0)]
impl fn_proto : cmp::Eq {
pure fn eq(&&other: fn_proto) -> bool {
match self {
proto_bare => {
match other {
proto_bare => true,
_ => false
}
}
proto_vstore(e0a) => {
match other {
proto_vstore(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: fn_proto) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl fn_proto : cmp::Eq {
pure fn eq(other: &fn_proto) -> bool {
match self {
@ -562,15 +493,6 @@ type FnTy = FnTyBase<FnMeta>;
type param_ty = {idx: uint, def_id: def_id};
#[cfg(stage0)]
impl param_ty: cmp::Eq {
pure fn eq(&&other: param_ty) -> bool {
self.idx == other.idx && self.def_id == other.def_id
}
pure fn ne(&&other: param_ty) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl param_ty : cmp::Eq {
pure fn eq(other: &param_ty) -> bool {
self.idx == (*other).idx && self.def_id == (*other).def_id
@ -1894,16 +1816,6 @@ fn remove_copyable(k: kind) -> kind {
k - kind_(KIND_MASK_COPY | KIND_MASK_DEFAULT_MODE)
}
#[cfg(stage0)]
impl kind: ops::BitAnd<kind,kind> {
pure fn bitand(other: kind) -> kind {
unsafe {
lower_kind(self, other)
}
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl kind : ops::BitAnd<kind,kind> {
pure fn bitand(other: &kind) -> kind {
unsafe {
@ -1912,16 +1824,6 @@ impl kind : ops::BitAnd<kind,kind> {
}
}
#[cfg(stage0)]
impl kind: ops::BitOr<kind,kind> {
pure fn bitor(other: kind) -> kind {
unsafe {
raise_kind(self, other)
}
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl kind : ops::BitOr<kind,kind> {
pure fn bitor(other: &kind) -> kind {
unsafe {
@ -1930,16 +1832,6 @@ impl kind : ops::BitOr<kind,kind> {
}
}
#[cfg(stage0)]
impl kind: ops::Sub<kind,kind> {
pure fn sub(other: kind) -> kind {
unsafe {
kind_(*self & !*other)
}
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl kind : ops::Sub<kind,kind> {
pure fn sub(other: &kind) -> kind {
unsafe {
@ -4040,15 +3932,6 @@ pure fn determine_inherited_purity(parent_purity: ast::purity,
} else { child_purity }
}
#[cfg(stage0)]
impl mt : cmp::Eq {
pure fn eq(&&other: mt) -> bool {
self.ty == other.ty && self.mutbl == other.mutbl
}
pure fn ne(&&other: mt) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl mt : cmp::Eq {
pure fn eq(other: &mt) -> bool {
self.ty == (*other).ty && self.mutbl == (*other).mutbl
@ -4056,15 +3939,6 @@ impl mt : cmp::Eq {
pure fn ne(other: &mt) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl arg : cmp::Eq {
pure fn eq(&&other: arg) -> bool {
self.mode == other.mode && self.ty == other.ty
}
pure fn ne(&&other: arg) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl arg : cmp::Eq {
pure fn eq(other: &arg) -> bool {
self.mode == (*other).mode && self.ty == (*other).ty
@ -4072,15 +3946,6 @@ impl arg : cmp::Eq {
pure fn ne(other: &arg) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl field : cmp::Eq {
pure fn eq(&&other: field) -> bool {
self.ident == other.ident && self.mt == other.mt
}
pure fn ne(&&other: field) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl field : cmp::Eq {
pure fn eq(other: &field) -> bool {
self.ident == (*other).ident && self.mt == (*other).mt
@ -4088,40 +3953,6 @@ impl field : cmp::Eq {
pure fn ne(other: &field) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl vstore : cmp::Eq {
pure fn eq(&&other: vstore) -> bool {
match self {
vstore_fixed(e0a) => {
match other {
vstore_fixed(e0b) => e0a == e0b,
_ => false
}
}
vstore_uniq => {
match other {
vstore_uniq => true,
_ => false
}
}
vstore_box => {
match other {
vstore_box => true,
_ => false
}
}
vstore_slice(e0a) => {
match other {
vstore_slice(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: vstore) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl vstore : cmp::Eq {
pure fn eq(other: &vstore) -> bool {
match self {
@ -4154,18 +3985,6 @@ impl vstore : cmp::Eq {
pure fn ne(other: &vstore) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl FnMeta : cmp::Eq {
pure fn eq(&&other: FnMeta) -> bool {
self.purity == other.purity &&
self.proto == other.proto &&
self.bounds == other.bounds &&
self.ret_style == other.ret_style
}
pure fn ne(&&other: FnMeta) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl FnMeta : cmp::Eq {
pure fn eq(other: &FnMeta) -> bool {
self.purity == (*other).purity &&
@ -4176,16 +3995,6 @@ impl FnMeta : cmp::Eq {
pure fn ne(other: &FnMeta) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl FnSig : cmp::Eq {
pure fn eq(&&other: FnSig) -> bool {
self.inputs == other.inputs &&
self.output == other.output
}
pure fn ne(&&other: FnSig) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl FnSig : cmp::Eq {
pure fn eq(other: &FnSig) -> bool {
self.inputs == (*other).inputs &&
@ -4194,15 +4003,6 @@ impl FnSig : cmp::Eq {
pure fn ne(other: &FnSig) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl<M: cmp::Eq> FnTyBase<M> : cmp::Eq {
pure fn eq(&&other: FnTyBase<M>) -> bool {
self.meta == other.meta && self.sig == other.sig
}
pure fn ne(&&other: FnTyBase<M>) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl<M: cmp::Eq> FnTyBase<M> : cmp::Eq {
pure fn eq(other: &FnTyBase<M>) -> bool {
self.meta == (*other).meta && self.sig == (*other).sig
@ -4210,94 +4010,26 @@ impl<M: cmp::Eq> FnTyBase<M> : cmp::Eq {
pure fn ne(other: &FnTyBase<M>) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl TyVid: cmp::Eq {
pure fn eq(&&other: TyVid) -> bool { *self == *other }
pure fn ne(&&other: TyVid) -> bool { *self != *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl TyVid : cmp::Eq {
pure fn eq(other: &TyVid) -> bool { *self == *(*other) }
pure fn ne(other: &TyVid) -> bool { *self != *(*other) }
}
#[cfg(stage0)]
impl IntVid: cmp::Eq {
pure fn eq(&&other: IntVid) -> bool { *self == *other }
pure fn ne(&&other: IntVid) -> bool { *self != *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl IntVid : cmp::Eq {
pure fn eq(other: &IntVid) -> bool { *self == *(*other) }
pure fn ne(other: &IntVid) -> bool { *self != *(*other) }
}
#[cfg(stage0)]
impl FnVid: cmp::Eq {
pure fn eq(&&other: FnVid) -> bool { *self == *other }
pure fn ne(&&other: FnVid) -> bool { *self != *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl FnVid : cmp::Eq {
pure fn eq(other: &FnVid) -> bool { *self == *(*other) }
pure fn ne(other: &FnVid) -> bool { *self != *(*other) }
}
#[cfg(stage0)]
impl RegionVid: cmp::Eq {
pure fn eq(&&other: RegionVid) -> bool { *self == *other }
pure fn ne(&&other: RegionVid) -> bool { *self != *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl RegionVid : cmp::Eq {
pure fn eq(other: &RegionVid) -> bool { *self == *(*other) }
pure fn ne(other: &RegionVid) -> bool { *self != *(*other) }
}
#[cfg(stage0)]
impl region : cmp::Eq {
pure fn eq(&&other: region) -> bool {
match self {
re_bound(e0a) => {
match other {
re_bound(e0b) => e0a == e0b,
_ => false
}
}
re_free(e0a, e1a) => {
match other {
re_free(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
re_scope(e0a) => {
match other {
re_scope(e0b) => e0a == e0b,
_ => false
}
}
re_static => {
match other {
re_static => true,
_ => false
}
}
re_var(e0a) => {
match other {
re_var(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: region) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl region : cmp::Eq {
pure fn eq(other: &region) -> bool {
match self {
@ -4336,40 +4068,6 @@ impl region : cmp::Eq {
pure fn ne(other: &region) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl bound_region : cmp::Eq {
pure fn eq(&&other: bound_region) -> bool {
match self {
br_self => {
match other {
br_self => true,
_ => false
}
}
br_anon(e0a) => {
match other {
br_anon(e0b) => e0a == e0b,
_ => false
}
}
br_named(e0a) => {
match other {
br_named(e0b) => e0a == e0b,
_ => false
}
}
br_cap_avoid(e0a, e1a) => {
match other {
br_cap_avoid(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
}
}
pure fn ne(&&other: bound_region) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl bound_region : cmp::Eq {
pure fn eq(other: &bound_region) -> bool {
match self {
@ -4402,17 +4100,6 @@ impl bound_region : cmp::Eq {
pure fn ne(other: &bound_region) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl substs : cmp::Eq {
pure fn eq(&&other: substs) -> bool {
self.self_r == other.self_r &&
self.self_ty == other.self_ty &&
self.tps == other.tps
}
pure fn ne(&&other: substs) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl substs : cmp::Eq {
pure fn eq(other: &substs) -> bool {
self.self_r == (*other).self_r &&
@ -4422,15 +4109,6 @@ impl substs : cmp::Eq {
pure fn ne(other: &substs) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl InferTy : cmp::Eq {
pure fn eq(&&other: InferTy) -> bool {
self.to_hash() == other.to_hash()
}
pure fn ne(&&other: InferTy) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl InferTy : cmp::Eq {
pure fn eq(other: &InferTy) -> bool {
self.to_hash() == (*other).to_hash()
@ -4438,167 +4116,6 @@ impl InferTy : cmp::Eq {
pure fn ne(other: &InferTy) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl sty : cmp::Eq {
pure fn eq(&&other: sty) -> bool {
match self {
ty_nil => {
match other {
ty_nil => true,
_ => false
}
}
ty_bot => {
match other {
ty_bot => true,
_ => false
}
}
ty_bool => {
match other {
ty_bool => true,
_ => false
}
}
ty_int(e0a) => {
match other {
ty_int(e0b) => e0a == e0b,
_ => false
}
}
ty_uint(e0a) => {
match other {
ty_uint(e0b) => e0a == e0b,
_ => false
}
}
ty_float(e0a) => {
match other {
ty_float(e0b) => e0a == e0b,
_ => false
}
}
ty_estr(e0a) => {
match other {
ty_estr(e0b) => e0a == e0b,
_ => false
}
}
ty_enum(e0a, e1a) => {
match other {
ty_enum(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
ty_box(e0a) => {
match other {
ty_box(e0b) => e0a == e0b,
_ => false
}
}
ty_uniq(e0a) => {
match other {
ty_uniq(e0b) => e0a == e0b,
_ => false
}
}
ty_evec(e0a, e1a) => {
match other {
ty_evec(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
ty_ptr(e0a) => {
match other {
ty_ptr(e0b) => e0a == e0b,
_ => false
}
}
ty_rptr(e0a, e1a) => {
match other {
ty_rptr(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
ty_rec(e0a) => {
match other {
ty_rec(e0b) => e0a == e0b,
_ => false
}
}
ty_fn(e0a) => {
match other {
ty_fn(e0b) => e0a == e0b,
_ => false
}
}
ty_trait(e0a, e1a, e2a) => {
match other {
ty_trait(e0b, e1b, e2b) =>
e0a == e0b && e1a == e1b && e2a == e2b,
_ => false
}
}
ty_class(e0a, e1a) => {
match other {
ty_class(e0b, e1b) => e0a == e0b && e1a == e1b,
_ => false
}
}
ty_tup(e0a) => {
match other {
ty_tup(e0b) => e0a == e0b,
_ => false
}
}
ty_infer(e0a) => {
match other {
ty_infer(e0b) => e0a == e0b,
_ => false
}
}
ty_param(e0a) => {
match other {
ty_param(e0b) => e0a == e0b,
_ => false
}
}
ty_self => {
match other {
ty_self => true,
_ => false
}
}
ty_type => {
match other {
ty_type => true,
_ => false
}
}
ty_opaque_box => {
match other {
ty_opaque_box => true,
_ => false
}
}
ty_opaque_closure_ptr(e0a) => {
match other {
ty_opaque_closure_ptr(e0b) => e0a == e0b,
_ => false
}
}
ty_unboxed_vec(e0a) => {
match other {
ty_unboxed_vec(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: sty) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl sty : cmp::Eq {
pure fn eq(other: &sty) -> bool {
match self {
@ -4758,46 +4275,6 @@ impl sty : cmp::Eq {
pure fn ne(other: &sty) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl param_bound : cmp::Eq {
pure fn eq(&&other: param_bound) -> bool {
match self {
bound_copy => {
match other {
bound_copy => true,
_ => false
}
}
bound_owned => {
match other {
bound_owned => true,
_ => false
}
}
bound_send => {
match other {
bound_send => true,
_ => false
}
}
bound_const => {
match other {
bound_const => true,
_ => false
}
}
bound_trait(e0a) => {
match other {
bound_trait(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: param_bound) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl param_bound : cmp::Eq {
pure fn eq(other: &param_bound) -> bool {
match self {
@ -4836,13 +4313,6 @@ impl param_bound : cmp::Eq {
pure fn ne(other: &param_bound) -> bool { !self.eq(other) }
}
#[cfg(stage0)]
impl kind : cmp::Eq {
pure fn eq(&&other: kind) -> bool { *self == *other }
pure fn ne(&&other: kind) -> bool { *self != *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl kind : cmp::Eq {
pure fn eq(other: &kind) -> bool { *self == *(*other) }
pure fn ne(other: &kind) -> bool { *self != *(*other) }

View File

@ -329,28 +329,6 @@ enum Constraint {
ConstrainVarSubReg(RegionVid, region)
}
#[cfg(stage0)]
impl Constraint: cmp::Eq {
pure fn eq(&&other: Constraint) -> bool {
match (self, other) {
(ConstrainVarSubVar(v0a, v1a), ConstrainVarSubVar(v0b, v1b)) => {
v0a == v0b && v1a == v1b
}
(ConstrainRegSubVar(ra, va), ConstrainRegSubVar(rb, vb)) => {
ra == rb && va == vb
}
(ConstrainVarSubReg(va, ra), ConstrainVarSubReg(vb, rb)) => {
va == vb && ra == rb
}
(ConstrainVarSubVar(*), _) => false,
(ConstrainRegSubVar(*), _) => false,
(ConstrainVarSubReg(*), _) => false
}
}
pure fn ne(&&other: Constraint) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Constraint : cmp::Eq {
pure fn eq(other: &Constraint) -> bool {
match (self, (*other)) {
@ -391,15 +369,6 @@ struct TwoRegions {
b: region,
}
#[cfg(stage0)]
impl TwoRegions: cmp::Eq {
pure fn eq(&&other: TwoRegions) -> bool {
self.a == other.a && self.b == other.b
}
pure fn ne(&&other: TwoRegions) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl TwoRegions : cmp::Eq {
pure fn eq(other: &TwoRegions) -> bool {
self.a == (*other).a && self.b == (*other).b
@ -786,15 +755,6 @@ priv impl RegionVarBindings {
enum Direction { Incoming = 0, Outgoing = 1 }
#[cfg(stage0)]
impl Direction : cmp::Eq {
pure fn eq(&&other: Direction) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: Direction) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Direction : cmp::Eq {
pure fn eq(other: &Direction) -> bool {
(self as uint) == ((*other) as uint)
@ -804,15 +764,6 @@ impl Direction : cmp::Eq {
enum Classification { Expanding, Contracting }
#[cfg(stage0)]
impl Classification : cmp::Eq {
pure fn eq(&&other: Classification) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: Classification) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Classification : cmp::Eq {
pure fn eq(other: &Classification) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -18,15 +18,6 @@ enum OutputFormat {
PandocHtml
}
#[cfg(stage0)]
impl OutputFormat : cmp::Eq {
pure fn eq(&&other: OutputFormat) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: OutputFormat) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl OutputFormat : cmp::Eq {
pure fn eq(other: &OutputFormat) -> bool {
(self as uint) == ((*other) as uint)
@ -42,15 +33,6 @@ enum OutputStyle {
DocPerMod
}
#[cfg(stage0)]
impl OutputStyle : cmp::Eq {
pure fn eq(&&other: OutputStyle) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: OutputStyle) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl OutputStyle : cmp::Eq {
pure fn eq(other: &OutputStyle) -> bool {
(self as uint) == ((*other) as uint)

View File

@ -6,15 +6,6 @@ type Doc_ = {
pages: ~[Page]
};
#[cfg(stage0)]
impl Doc_ : cmp::Eq {
pure fn eq(&&other: Doc_) -> bool {
self.pages == other.pages
}
pure fn ne(&&other: Doc_) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Doc_ : cmp::Eq {
pure fn eq(other: &Doc_) -> bool {
self.pages == (*other).pages
@ -26,13 +17,6 @@ enum Doc {
Doc_(Doc_)
}
#[cfg(stage0)]
impl Doc : cmp::Eq {
pure fn eq(&&other: Doc) -> bool { *self == *other }
pure fn ne(&&other: Doc) -> bool { *self != *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Doc : cmp::Eq {
pure fn eq(other: &Doc) -> bool { *self == *(*other) }
pure fn ne(other: &Doc) -> bool { *self != *(*other) }
@ -43,28 +27,6 @@ enum Page {
ItemPage(ItemTag)
}
#[cfg(stage0)]
impl Page : cmp::Eq {
pure fn eq(&&other: Page) -> bool {
match self {
CratePage(e0a) => {
match other {
CratePage(e0b) => e0a == e0b,
_ => false
}
}
ItemPage(e0a) => {
match other {
ItemPage(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: Page) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Page : cmp::Eq {
pure fn eq(other: &Page) -> bool {
match self {
@ -90,15 +52,6 @@ enum Implementation {
Provided,
}
#[cfg(stage0)]
impl Implementation : cmp::Eq {
pure fn eq(&&other: Implementation) -> bool {
(self as uint) == (other as uint)
}
pure fn ne(&&other: Implementation) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Implementation : cmp::Eq {
pure fn eq(other: &Implementation) -> bool {
(self as uint) == ((*other) as uint)
@ -116,15 +69,6 @@ type Section = {
body: ~str
};
#[cfg(stage0)]
impl Section : cmp::Eq {
pure fn eq(&&other: Section) -> bool {
self.header == other.header && self.body == other.body
}
pure fn ne(&&other: Section) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Section : cmp::Eq {
pure fn eq(other: &Section) -> bool {
self.header == (*other).header && self.body == (*other).body
@ -139,15 +83,6 @@ type CrateDoc = {
topmod: ModDoc,
};
#[cfg(stage0)]
impl CrateDoc : cmp::Eq {
pure fn eq(&&other: CrateDoc) -> bool {
self.topmod == other.topmod
}
pure fn ne(&&other: CrateDoc) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl CrateDoc : cmp::Eq {
pure fn eq(other: &CrateDoc) -> bool {
self.topmod == (*other).topmod
@ -167,70 +102,6 @@ enum ItemTag {
StructTag(StructDoc)
}
#[cfg(stage0)]
impl ItemTag : cmp::Eq {
pure fn eq(&&other: ItemTag) -> bool {
match self {
ModTag(e0a) => {
match other {
ModTag(e0b) => e0a == e0b,
_ => false
}
}
NmodTag(e0a) => {
match other {
NmodTag(e0b) => e0a == e0b,
_ => false
}
}
ConstTag(e0a) => {
match other {
ConstTag(e0b) => e0a == e0b,
_ => false
}
}
FnTag(e0a) => {
match other {
FnTag(e0b) => e0a == e0b,
_ => false
}
}
EnumTag(e0a) => {
match other {
EnumTag(e0b) => e0a == e0b,
_ => false
}
}
TraitTag(e0a) => {
match other {
TraitTag(e0b) => e0a == e0b,
_ => false
}
}
ImplTag(e0a) => {
match other {
ImplTag(e0b) => e0a == e0b,
_ => false
}
}
TyTag(e0a) => {
match other {
TyTag(e0b) => e0a == e0b,
_ => false
}
}
StructTag(e0a) => {
match other {
StructTag(e0b) => e0a == e0b,
_ => false
}
}
}
}
pure fn ne(&&other: ItemTag) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ItemTag : cmp::Eq {
pure fn eq(other: &ItemTag) -> bool {
match self {
@ -304,21 +175,6 @@ type ItemDoc = {
reexport: bool
};
#[cfg(stage0)]
impl ItemDoc : cmp::Eq {
pure fn eq(&&other: ItemDoc) -> bool {
self.id == other.id &&
self.name == other.name &&
self.path == other.path &&
self.brief == other.brief &&
self.desc == other.desc &&
self.sections == other.sections &&
self.reexport == other.reexport
}
pure fn ne(&&other: ItemDoc) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ItemDoc : cmp::Eq {
pure fn eq(other: &ItemDoc) -> bool {
self.id == (*other).id &&
@ -337,15 +193,6 @@ type SimpleItemDoc = {
sig: Option<~str>
};
#[cfg(stage0)]
impl SimpleItemDoc : cmp::Eq {
pure fn eq(&&other: SimpleItemDoc) -> bool {
self.item == other.item && self.sig == other.sig
}
pure fn ne(&&other: SimpleItemDoc) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl SimpleItemDoc : cmp::Eq {
pure fn eq(other: &SimpleItemDoc) -> bool {
self.item == (*other).item && self.sig == (*other).sig
@ -359,17 +206,6 @@ type ModDoc_ = {
index: Option<Index>
};
#[cfg(stage0)]
impl ModDoc_ : cmp::Eq {
pure fn eq(&&other: ModDoc_) -> bool {
self.item == other.item &&
self.items == other.items &&
self.index == other.index
}
pure fn ne(&&other: ModDoc_) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ModDoc_ : cmp::Eq {
pure fn eq(other: &ModDoc_) -> bool {
self.item == (*other).item &&
@ -383,13 +219,6 @@ enum ModDoc {
ModDoc_(ModDoc_)
}
#[cfg(stage0)]
impl ModDoc : cmp::Eq {
pure fn eq(&&other: ModDoc) -> bool { *self == *other }
pure fn ne(&&other: ModDoc) -> bool { *self != *other }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ModDoc : cmp::Eq {
pure fn eq(other: &ModDoc) -> bool { *self == *(*other) }
pure fn ne(other: &ModDoc) -> bool { *self != *(*other) }
@ -401,17 +230,6 @@ type NmodDoc = {
index: Option<Index>
};
#[cfg(stage0)]
impl NmodDoc : cmp::Eq {
pure fn eq(&&other: NmodDoc) -> bool {
self.item == other.item &&
self.fns == other.fns &&
self.index == other.index
}
pure fn ne(&&other: NmodDoc) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl NmodDoc : cmp::Eq {
pure fn eq(other: &NmodDoc) -> bool {
self.item == (*other).item &&
@ -430,15 +248,6 @@ type EnumDoc = {
variants: ~[VariantDoc]
};
#[cfg(stage0)]
impl EnumDoc : cmp::Eq {
pure fn eq(&&other: EnumDoc) -> bool {
self.item == other.item && self.variants == other.variants
}
pure fn ne(&&other: EnumDoc) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl EnumDoc : cmp::Eq {
pure fn eq(other: &EnumDoc) -> bool {
self.item == (*other).item && self.variants == (*other).variants
@ -452,17 +261,6 @@ type VariantDoc = {
sig: Option<~str>
};
#[cfg(stage0)]
impl VariantDoc : cmp::Eq {
pure fn eq(&&other: VariantDoc) -> bool {
self.name == other.name &&
self.desc == other.desc &&
self.sig == other.sig
}
pure fn ne(&&other: VariantDoc) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl VariantDoc : cmp::Eq {
pure fn eq(other: &VariantDoc) -> bool {
self.name == (*other).name &&
@ -477,15 +275,6 @@ type TraitDoc = {
methods: ~[MethodDoc]
};
#[cfg(stage0)]
impl TraitDoc : cmp::Eq {
pure fn eq(&&other: TraitDoc) -> bool {
self.item == other.item && self.methods == other.methods
}
pure fn ne(&&other: TraitDoc) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl TraitDoc : cmp::Eq {
pure fn eq(other: &TraitDoc) -> bool {
self.item == (*other).item && self.methods == (*other).methods
@ -502,20 +291,6 @@ type MethodDoc = {
implementation: Implementation,
};
#[cfg(stage0)]
impl MethodDoc : cmp::Eq {
pure fn eq(&&other: MethodDoc) -> bool {
self.name == other.name &&
self.brief == other.brief &&
self.desc == other.desc &&
self.sections == other.sections &&
self.sig == other.sig &&
self.implementation == other.implementation
}
pure fn ne(&&other: MethodDoc) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl MethodDoc : cmp::Eq {
pure fn eq(other: &MethodDoc) -> bool {
self.name == (*other).name &&
@ -535,18 +310,6 @@ type ImplDoc = {
methods: ~[MethodDoc]
};
#[cfg(stage0)]
impl ImplDoc : cmp::Eq {
pure fn eq(&&other: ImplDoc) -> bool {
self.item == other.item &&
self.trait_types == other.trait_types &&
self.self_ty == other.self_ty &&
self.methods == other.methods
}
pure fn ne(&&other: ImplDoc) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl ImplDoc : cmp::Eq {
pure fn eq(other: &ImplDoc) -> bool {
self.item == (*other).item &&
@ -578,15 +341,6 @@ type Index = {
entries: ~[IndexEntry]
};
#[cfg(stage0)]
impl Index : cmp::Eq {
pure fn eq(&&other: Index) -> bool {
self.entries == other.entries
}
pure fn ne(&&other: Index) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Index : cmp::Eq {
pure fn eq(other: &Index) -> bool {
self.entries == (*other).entries
@ -611,18 +365,6 @@ type IndexEntry = {
link: ~str
};
#[cfg(stage0)]
impl IndexEntry : cmp::Eq {
pure fn eq(&&other: IndexEntry) -> bool {
self.kind == other.kind &&
self.name == other.name &&
self.brief == other.brief &&
self.link == other.link
}
pure fn ne(&&other: IndexEntry) -> bool { !self.eq(other) }
}
#[cfg(stage1)]
#[cfg(stage2)]
impl IndexEntry : cmp::Eq {
pure fn eq(other: &IndexEntry) -> bool {
self.kind == (*other).kind &&

View File

@ -1,3 +1,11 @@
S 2012-09-23 92752a4
macos-i386 0d5130364e8610413c9da965ca5ce6967f32ab3d
macos-x86_64 a0bc17c9025c509b0ecfb35d04e35b8b232f2687
freebsd-x86_64 6568c5ab6199e0e24fb442511ccb2ebad8eb4785
linux-i386 685318ae8cd618eff60b51015ebe51b34383072b
linux-x86_64 d8893f7c2be05bf18fbda26e65a151446251a3bd
winnt-i386 23f8a9d0d788cdcc0a69a3276adb457cf4aa474f
S 2012-09-12 fa74edf
macos-i386 da38aa39fd1515ea765790a3c320194bc50fd602
macos-x86_64 7509861e5a6d3e082ad9a9d3474661856b7731c1

View File

@ -2,14 +2,6 @@
enum foo = ~uint;
#[cfg(stage0)]
impl foo: Add<foo, foo> {
pure fn add(f: foo) -> foo {
foo(~(**self + **f))
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl foo : Add<foo, foo> {
pure fn add(f: &foo) -> foo {
foo(~(**self + **(*f)))

View File

@ -8,14 +8,6 @@ struct Point {
y: int,
}
#[cfg(stage0)]
impl Point : ops::Add<int,int> {
pure fn add(&&z: int) -> int {
self.x + self.y + z
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl Point : ops::Add<int,int> {
pure fn add(z: &int) -> int {
self.x + self.y + (*z)

View File

@ -16,14 +16,6 @@ struct S {
fn S(x: int) -> S { S { x: x } }
#[cfg(stage0)]
impl S: Add<S, S> {
pure fn add(rhs: S) -> S {
S { x: self.x + rhs.x }
}
}
#[cfg(stage1)]
#[cfg(stage2)]
impl S : Add<S, S> {
pure fn add(rhs: &S) -> S {
S { x: self.x + (*rhs).x }