diff options
Diffstat (limited to 'src/compiletest/common.rs')
| -rw-r--r-- | src/compiletest/common.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiletest/common.rs b/src/compiletest/common.rs index 3527dbe2f10..b951c9fc3c1 100644 --- a/src/compiletest/common.rs +++ b/src/compiletest/common.rs @@ -1,11 +1,20 @@ 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(&self, other: &mode) -> bool { + (*other) as int == (*self) as int + } + pure fn ne(&self, other: &mode) -> bool { !(*self).eq(other) } +} type config = { // The library paths required for running the compiler |
