From 8179e268efd86ae5c1bcf21b4f8d4e01eea7c193 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 28 Nov 2012 12:33:00 -0800 Subject: Register snapshots --- src/libsyntax/codemap.rs | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'src/libsyntax/codemap.rs') diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index fafcd09e3dc..2b77c805791 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -37,29 +37,11 @@ impl BytePos: Pos { pure fn to_uint(&self) -> uint { **self } } -#[cfg(stage0)] -impl BytePos: cmp::Eq { - pure fn eq(other: &BytePos) -> bool { *self == **other } - pure fn ne(other: &BytePos) -> bool { !self.eq(other) } -} - -#[cfg(stage1)] -#[cfg(stage2)] impl BytePos: cmp::Eq { pure fn eq(&self, other: &BytePos) -> bool { **self == **other } pure fn ne(&self, other: &BytePos) -> bool { !(*self).eq(other) } } -#[cfg(stage0)] -impl BytePos: cmp::Ord { - pure fn lt(other: &BytePos) -> bool { *self < **other } - pure fn le(other: &BytePos) -> bool { *self <= **other } - pure fn ge(other: &BytePos) -> bool { *self >= **other } - pure fn gt(other: &BytePos) -> bool { *self > **other } -} - -#[cfg(stage1)] -#[cfg(stage2)] impl BytePos: cmp::Ord { pure fn lt(&self, other: &BytePos) -> bool { **self < **other } pure fn le(&self, other: &BytePos) -> bool { **self <= **other } @@ -101,29 +83,11 @@ impl CharPos: Pos { pure fn to_uint(&self) -> uint { **self } } -#[cfg(stage0)] -impl CharPos: cmp::Eq { - pure fn eq(other: &CharPos) -> bool { *self == **other } - pure fn ne(other: &CharPos) -> bool { !self.eq(other) } -} - -#[cfg(stage1)] -#[cfg(stage2)] impl CharPos: cmp::Eq { pure fn eq(&self, other: &CharPos) -> bool { **self == **other } pure fn ne(&self, other: &CharPos) -> bool { !(*self).eq(other) } } -#[cfg(stage0)] -impl CharPos: cmp::Ord { - pure fn lt(other: &CharPos) -> bool { *self < **other } - pure fn le(other: &CharPos) -> bool { *self <= **other } - pure fn ge(other: &CharPos) -> bool { *self >= **other } - pure fn gt(other: &CharPos) -> bool { *self > **other } -} - -#[cfg(stage1)] -#[cfg(stage2)] impl CharPos: cmp::Ord { pure fn lt(&self, other: &CharPos) -> bool { **self < **other } pure fn le(&self, other: &CharPos) -> bool { **self <= **other } @@ -173,19 +137,9 @@ pub struct span { } impl span : cmp::Eq { - #[cfg(stage0)] - pure fn eq(other: &span) -> bool { - return self.lo == (*other).lo && self.hi == (*other).hi; - } - #[cfg(stage1)] - #[cfg(stage2)] pure fn eq(&self, other: &span) -> bool { return (*self).lo == (*other).lo && (*self).hi == (*other).hi; } - #[cfg(stage0)] - pure fn ne(other: &span) -> bool { !self.eq(other) } - #[cfg(stage1)] - #[cfg(stage2)] pure fn ne(&self, other: &span) -> bool { !(*self).eq(other) } } -- cgit 1.4.1-3-g733a5