diff options
Diffstat (limited to 'src/libcore/char.rs')
| -rw-r--r-- | src/libcore/char.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libcore/char.rs b/src/libcore/char.rs index fb8cc274217..0a775ca1ac3 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -181,8 +181,16 @@ pub pure fn cmp(a: char, b: char) -> int { } impl char : Eq { + #[cfg(stage0)] pure fn eq(other: &char) -> bool { self == (*other) } + #[cfg(stage1)] + #[cfg(stage2)] + pure fn eq(&self, other: &char) -> bool { (*self) == (*other) } + #[cfg(stage0)] pure fn ne(other: &char) -> bool { self != (*other) } + #[cfg(stage1)] + #[cfg(stage2)] + pure fn ne(&self, other: &char) -> bool { (*self) != (*other) } } #[test] |
