about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-17 23:02:47 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-19 08:58:10 -0800
commit84086c464f537591f0e4629676b3fc75517492ab (patch)
tree7226ef61282962ff5be4772db3b1e849d6ba5cbe /src/libsyntax
parentbd90b936d73c0ea2c261cd8e7b9c43764cb2da05 (diff)
downloadrust-84086c464f537591f0e4629676b3fc75517492ab.tar.gz
rust-84086c464f537591f0e4629676b3fc75517492ab.zip
Register new snapshots
This does not yet start the movement to rustc-serialize. That detail is left to
a future PR.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/codemap.rs36
-rw-r--r--src/libsyntax/ext/tt/transcribe.rs24
2 files changed, 0 insertions, 60 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index 17cafc2441f..eae41a21e7d 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -52,30 +52,12 @@ impl Pos for BytePos {
     fn to_uint(&self) -> uint { let BytePos(n) = *self; n as uint }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl Add<BytePos, BytePos> for BytePos {
-    fn add(&self, rhs: &BytePos) -> BytePos {
-        BytePos((self.to_uint() + rhs.to_uint()) as u32)
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl Add<BytePos, BytePos> for BytePos {
     fn add(self, rhs: BytePos) -> BytePos {
         BytePos((self.to_uint() + rhs.to_uint()) as u32)
     }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl Sub<BytePos, BytePos> for BytePos {
-    fn sub(&self, rhs: &BytePos) -> BytePos {
-        BytePos((self.to_uint() - rhs.to_uint()) as u32)
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl Sub<BytePos, BytePos> for BytePos {
     fn sub(self, rhs: BytePos) -> BytePos {
         BytePos((self.to_uint() - rhs.to_uint()) as u32)
@@ -87,30 +69,12 @@ impl Pos for CharPos {
     fn to_uint(&self) -> uint { let CharPos(n) = *self; n }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl Add<CharPos,CharPos> for CharPos {
-    fn add(&self, rhs: &CharPos) -> CharPos {
-        CharPos(self.to_uint() + rhs.to_uint())
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl Add<CharPos, CharPos> for CharPos {
     fn add(self, rhs: CharPos) -> CharPos {
         CharPos(self.to_uint() + rhs.to_uint())
     }
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl Sub<CharPos,CharPos> for CharPos {
-    fn sub(&self, rhs: &CharPos) -> CharPos {
-        CharPos(self.to_uint() - rhs.to_uint())
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl Sub<CharPos, CharPos> for CharPos {
     fn sub(self, rhs: CharPos) -> CharPos {
         CharPos(self.to_uint() - rhs.to_uint())
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs
index e2439bad178..378dbba07fa 100644
--- a/src/libsyntax/ext/tt/transcribe.rs
+++ b/src/libsyntax/ext/tt/transcribe.rs
@@ -106,30 +106,6 @@ enum LockstepIterSize {
     LisContradiction(String),
 }
 
-// NOTE(stage0): Remove impl after a snapshot
-#[cfg(stage0)]
-impl Add<LockstepIterSize, LockstepIterSize> for LockstepIterSize {
-    fn add(&self, other: &LockstepIterSize) -> LockstepIterSize {
-        match *self {
-            LisUnconstrained => other.clone(),
-            LisContradiction(_) => self.clone(),
-            LisConstraint(l_len, l_id) => match *other {
-                LisUnconstrained => self.clone(),
-                LisContradiction(_) => other.clone(),
-                LisConstraint(r_len, _) if l_len == r_len => self.clone(),
-                LisConstraint(r_len, r_id) => {
-                    let l_n = token::get_ident(l_id);
-                    let r_n = token::get_ident(r_id);
-                    LisContradiction(format!("inconsistent lockstep iteration: \
-                                              '{}' has {} items, but '{}' has {}",
-                                              l_n, l_len, r_n, r_len).to_string())
-                }
-            },
-        }
-    }
-}
-
-#[cfg(not(stage0))]  // NOTE(stage0): Remove cfg after a snapshot
 impl Add<LockstepIterSize, LockstepIterSize> for LockstepIterSize {
     fn add(self, other: LockstepIterSize) -> LockstepIterSize {
         match self {