about summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/common.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiletest/common.rs b/src/compiletest/common.rs
index b5a20f49de4..14859ebef6e 100644
--- a/src/compiletest/common.rs
+++ b/src/compiletest/common.rs
@@ -2,6 +2,12 @@ import option;
 
 enum mode { mode_compile_fail, mode_run_fail, mode_run_pass, mode_pretty, }
 
+impl mode : cmp::Eq {
+    pure fn eq(&&other: mode) -> bool {
+        other as int == self as int
+    }
+}
+
 type config = {
     // The library paths required for running the compiler
     compile_lib_path: ~str,