about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-05-04 15:48:36 -0700
committerbors <bors@rust-lang.org>2013-05-04 15:48:36 -0700
commitd74ac9ea03eb8faab72ce48b89dd47a14f45982a (patch)
tree9154d7c17af39c1e817bf27652d6a9d45b4009b5 /src/libsyntax
parentb872900a5b4adb53b7d74d45a3138083b22940d6 (diff)
parent8081e8debf63726865e869aaacbd040755285a51 (diff)
downloadrust-d74ac9ea03eb8faab72ce48b89dd47a14f45982a.tar.gz
rust-d74ac9ea03eb8faab72ce48b89dd47a14f45982a.zip
auto merge of #6240 : brson/rust/snapshots, r=brson
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs31
-rw-r--r--src/libsyntax/codemap.rs15
-rw-r--r--src/libsyntax/ext/base.rs11
-rw-r--r--src/libsyntax/opt_vec.rs9
4 files changed, 0 insertions, 66 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 77e79866160..2216226ecb3 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -70,22 +70,6 @@ pub type Name = uint;
 // with a macro expansion
 pub type Mrk = uint;
 
-#[cfg(stage0)]
-impl<S:Encoder> Encodable<S> for ident {
-    fn encode(&self, s: &S) {
-        unsafe {
-            let intr =
-                match task::local_data::local_data_get(interner_key!()) {
-                    None => fail!(~"encode: TLS interner not set up"),
-                    Some(intr) => intr
-                };
-
-            s.emit_str(*(*intr).get(*self));
-        }
-    }
-}
-
-#[cfg(not(stage0))]
 impl<S:Encoder> Encodable<S> for ident {
     fn encode(&self, s: &mut S) {
         unsafe {
@@ -100,21 +84,6 @@ impl<S:Encoder> Encodable<S> for ident {
     }
 }
 
-#[cfg(stage0)]
-impl<D:Decoder> Decodable<D> for ident {
-    fn decode(d: &D) -> ident {
-        let intr = match unsafe {
-            task::local_data::local_data_get(interner_key!())
-        } {
-            None => fail!(~"decode: TLS interner not set up"),
-            Some(intr) => intr
-        };
-
-        (*intr).intern(@d.read_str())
-    }
-}
-
-#[cfg(not(stage0))]
 impl<D:Decoder> Decodable<D> for ident {
     fn decode(d: &mut D) -> ident {
         let intr = match unsafe {
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index bbb390e9dc9..66ed52f0352 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -125,13 +125,6 @@ impl cmp::Eq for span {
     fn ne(&self, other: &span) -> bool { !(*self).eq(other) }
 }
 
-#[cfg(stage0)]
-impl<S:Encoder> Encodable<S> for span {
-    /* Note #1972 -- spans are encoded but not decoded */
-    fn encode(&self, _s: &S) { _s.emit_nil() }
-}
-
-#[cfg(not(stage0))]
 impl<S:Encoder> Encodable<S> for span {
     /* Note #1972 -- spans are encoded but not decoded */
     fn encode(&self, s: &mut S) {
@@ -139,14 +132,6 @@ impl<S:Encoder> Encodable<S> for span {
     }
 }
 
-#[cfg(stage0)]
-impl<D:Decoder> Decodable<D> for span {
-    fn decode(_d: &D) -> span {
-        dummy_sp()
-    }
-}
-
-#[cfg(not(stage0))]
 impl<D:Decoder> Decodable<D> for span {
     fn decode(_d: &mut D) -> span {
         dummy_sp()
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs
index db4912d2131..e56dab6db20 100644
--- a/src/libsyntax/ext/base.rs
+++ b/src/libsyntax/ext/base.rs
@@ -451,17 +451,6 @@ impl <K: Eq + Hash + IterBytes ,V: Copy> MapChain<K,V>{
 
     // ugh: can't get this to compile with mut because of the
     // lack of flow sensitivity.
-    #[cfg(stage0)]
-    fn get_map(&self) -> &'self HashMap<K,@V> {
-        match *self {
-            BaseMapChain (~ref map) => map,
-            ConsMapChain (~ref map,_) => map
-        }
-    }
-
-    // ugh: can't get this to compile with mut because of the
-    // lack of flow sensitivity.
-    #[cfg(not(stage0))]
     fn get_map<'a>(&'a self) -> &'a HashMap<K,@V> {
         match *self {
             BaseMapChain (~ref map) => map,
diff --git a/src/libsyntax/opt_vec.rs b/src/libsyntax/opt_vec.rs
index 6cf7bba600e..600ab964e52 100644
--- a/src/libsyntax/opt_vec.rs
+++ b/src/libsyntax/opt_vec.rs
@@ -61,15 +61,6 @@ impl<T> OptVec<T> {
         }
     }
 
-    #[cfg(stage0)]
-    fn get(&self, i: uint) -> &'self T {
-        match *self {
-            Empty => fail!(fmt!("Invalid index %u", i)),
-            Vec(ref v) => &v[i]
-        }
-    }
-
-    #[cfg(not(stage0))]
     fn get<'a>(&'a self, i: uint) -> &'a T {
         match *self {
             Empty => fail!(fmt!("Invalid index %u", i)),