about summary refs log tree commit diff
path: root/src/libstd/getopts.rs
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/libstd/getopts.rs
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/libstd/getopts.rs')
-rw-r--r--src/libstd/getopts.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/getopts.rs b/src/libstd/getopts.rs
index 50bad1e748a..092bf5cfd78 100644
--- a/src/libstd/getopts.rs
+++ b/src/libstd/getopts.rs
@@ -124,12 +124,14 @@ impl Name : Eq {
             }
         }
     }
+    pure fn ne(&&other: Name) -> bool { !self.eq(other) }
 }
 
 impl Occur : Eq {
     pure fn eq(&&other: Occur) -> bool {
         (self as uint) == (other as uint)
     }
+    pure fn ne(&&other: Occur) -> bool { !self.eq(other) }
 }
 
 /// Create an option that is required and takes an argument
@@ -449,6 +451,7 @@ 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(test)]