about summary refs log tree commit diff
path: root/src/rustc/driver
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2012-09-07 12:06:02 -0700
committerPatrick Walton <pcwalton@mimiga.net>2012-09-07 12:24:48 -0700
commitfeb014eb3c3aa1ccaae1df407801dffa090499fd (patch)
tree8ffeec6945de4843f9e0d150720596327530e00f /src/rustc/driver
parentac1f84c153a171e641233e5d2d11404a0b520986 (diff)
downloadrust-feb014eb3c3aa1ccaae1df407801dffa090499fd.tar.gz
rust-feb014eb3c3aa1ccaae1df407801dffa090499fd.zip
rustc: Add an "ne" method to the Eq trait, and implement it everywhere
Diffstat (limited to 'src/rustc/driver')
-rw-r--r--src/rustc/driver/driver.rs1
-rw-r--r--src/rustc/driver/rustc.rs1
-rw-r--r--src/rustc/driver/session.rs3
3 files changed, 5 insertions, 0 deletions
diff --git a/src/rustc/driver/driver.rs b/src/rustc/driver/driver.rs
index 024452302da..ecdd02b4697 100644
--- a/src/rustc/driver/driver.rs
+++ b/src/rustc/driver/driver.rs
@@ -140,6 +140,7 @@ 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) }
 }
 
 fn compile_upto(sess: session, cfg: ast::crate_cfg,
diff --git a/src/rustc/driver/rustc.rs b/src/rustc/driver/rustc.rs
index 8b8325853cc..3c0e4d0f9e1 100644
--- a/src/rustc/driver/rustc.rs
+++ b/src/rustc/driver/rustc.rs
@@ -209,6 +209,7 @@ 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) }
 }
 
 /*
diff --git a/src/rustc/driver/session.rs b/src/rustc/driver/session.rs
index 290c6e94654..66544d72db5 100644
--- a/src/rustc/driver/session.rs
+++ b/src/rustc/driver/session.rs
@@ -16,6 +16,7 @@ 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) }
 }
 
 enum arch { arch_x86, arch_x86_64, arch_arm, }
@@ -24,6 +25,7 @@ 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) }
 }
 
 enum crate_type { bin_crate, lib_crate, unknown_crate, }
@@ -95,6 +97,7 @@ 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) }
 }
 
 type options =