summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-06 09:24:46 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-06 15:24:24 -0800
commite2f97f51ad4cf902e5a5835b5332447fe59089c4 (patch)
tree6158174fbd2ae40d72c113d398ff192a936804f7 /src/libsyntax
parent5c3ddcb15dc8b40fa780a38fd7494b9b5b991d09 (diff)
downloadrust-e2f97f51ad4cf902e5a5835b5332447fe59089c4.tar.gz
rust-e2f97f51ad4cf902e5a5835b5332447fe59089c4.zip
Register new snapshots
Conflicts:
	src/librbml/lib.rs
	src/libserialize/json_stage0.rs
	src/libserialize/serialize_stage0.rs
	src/libsyntax/ast.rs
	src/libsyntax/ext/deriving/generic/mod.rs
	src/libsyntax/parse/token.rs
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs16
-rw-r--r--src/libsyntax/codemap.rs17
-rw-r--r--src/libsyntax/ext/deriving/generic/mod.rs10
-rw-r--r--src/libsyntax/ext/deriving/mod.rs2
-rw-r--r--src/libsyntax/feature_gate.rs2
-rw-r--r--src/libsyntax/lib.rs14
-rw-r--r--src/libsyntax/owned_slice.rs19
-rw-r--r--src/libsyntax/parse/mod.rs3
-rw-r--r--src/libsyntax/parse/token.rs17
-rw-r--r--src/libsyntax/ptr.rs16
10 files changed, 10 insertions, 106 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 10cdea791b8..45233dd5225 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -195,28 +195,12 @@ impl Name {
 /// A mark represents a unique id associated with a macro expansion
 pub type Mrk = u32;
 
-#[cfg(stage0)]
-impl<S: Encoder<E>, E> Encodable<S, E> for Ident {
-    fn encode(&self, s: &mut S) -> Result<(), E> {
-        s.emit_str(token::get_ident(*self).get())
-    }
-}
-
-#[cfg(not(stage0))]
 impl Encodable for Ident {
     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
         s.emit_str(token::get_ident(*self).get())
     }
 }
 
-#[cfg(stage0)]
-impl<D: Decoder<E>, E> Decodable<D, E> for Ident {
-    fn decode(d: &mut D) -> Result<Ident, E> {
-        Ok(str_to_ident(try!(d.read_str()).index(&FullRange)))
-    }
-}
-
-#[cfg(not(stage0))]
 impl Decodable for Ident {
     fn decode<D: Decoder>(d: &mut D) -> Result<Ident, D::Error> {
         Ok(str_to_ident(try!(d.read_str()).index(&FullRange)))
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index 04753bdf652..31fe23847d9 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -120,15 +120,6 @@ impl PartialEq for Span {
 
 impl Eq for Span {}
 
-#[cfg(stage0)]
-impl<S:Encoder<E>, E> Encodable<S, E> for Span {
-    /* Note #1972 -- spans are encoded but not decoded */
-    fn encode(&self, s: &mut S) -> Result<(), E> {
-        s.emit_nil()
-    }
-}
-
-#[cfg(not(stage0))]
 impl Encodable for Span {
     /* Note #1972 -- spans are encoded but not decoded */
     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
@@ -136,14 +127,6 @@ impl Encodable for Span {
     }
 }
 
-#[cfg(stage0)]
-impl<D:Decoder<E>, E> Decodable<D, E> for Span {
-    fn decode(_d: &mut D) -> Result<Span, E> {
-        Ok(DUMMY_SP)
-    }
-}
-
-#[cfg(not(stage0))]
 impl Decodable for Span {
     fn decode<D: Decoder>(_d: &mut D) -> Result<Span, D::Error> {
         Ok(DUMMY_SP)
diff --git a/src/libsyntax/ext/deriving/generic/mod.rs b/src/libsyntax/ext/deriving/generic/mod.rs
index 8f13a4475b7..50b3559f369 100644
--- a/src/libsyntax/ext/deriving/generic/mod.rs
+++ b/src/libsyntax/ext/deriving/generic/mod.rs
@@ -602,7 +602,7 @@ impl<'a> MethodDef<'a> {
         };
         let mut f = self.combine_substructure.borrow_mut();
         let f: &mut CombineSubstructureFunc = &mut *f;
-        f.call_mut((cx, trait_.span, &substructure))
+        f(cx, trait_.span, &substructure)
     }
 
     fn get_ret_ty(&self,
@@ -1365,8 +1365,8 @@ pub fn cs_fold<F>(use_foldl: bool,
             }
         },
         EnumNonMatchingCollapsed(ref all_args, _, tuple) =>
-            enum_nonmatch_f.call_mut((cx, trait_span, (all_args.index(&FullRange), tuple),
-                                      substructure.nonself_args)),
+            enum_nonmatch_f(cx, trait_span, (all_args.index(&FullRange), tuple),
+                            substructure.nonself_args),
         StaticEnum(..) | StaticStruct(..) => {
             cx.span_bug(trait_span, "static function in `derive`")
         }
@@ -1405,8 +1405,8 @@ pub fn cs_same_method<F>(f: F,
             f(cx, trait_span, called)
         },
         EnumNonMatchingCollapsed(ref all_self_args, _, tuple) =>
-            enum_nonmatch_f.call_mut((cx, trait_span, (all_self_args.index(&FullRange), tuple),
-                                     substructure.nonself_args)),
+            enum_nonmatch_f(cx, trait_span, (all_self_args.index(&FullRange), tuple),
+                            substructure.nonself_args),
         StaticEnum(..) | StaticStruct(..) => {
             cx.span_bug(trait_span, "static function in `derive`")
         }
diff --git a/src/libsyntax/ext/deriving/mod.rs b/src/libsyntax/ext/deriving/mod.rs
index b44aa9dbd9f..43a0e0606f8 100644
--- a/src/libsyntax/ext/deriving/mod.rs
+++ b/src/libsyntax/ext/deriving/mod.rs
@@ -73,7 +73,7 @@ pub fn expand_meta_derive(cx: &mut ExtCtxt,
                     MetaWord(ref tname) => {
                         macro_rules! expand {
                             ($func:path) => ($func(cx, titem.span, &**titem, item,
-                                                   |i| push.call_mut((i,))))
+                                                   |i| push(i)))
                         }
 
                         match tname.get() {
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 2c36a02d44f..38a369bdb57 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -44,7 +44,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
     ("non_ascii_idents", Active),
     ("thread_local", Active),
     ("link_args", Active),
-    ("phase", Active),  // NOTE(stage0): switch to Removed after next snapshot
+    ("phase", Removed),
     ("plugin_registrar", Active),
     ("log_syntax", Active),
     ("trace_macros", Active),
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs
index b7bfd346d50..9e14f9dd1ea 100644
--- a/src/libsyntax/lib.rs
+++ b/src/libsyntax/lib.rs
@@ -23,25 +23,15 @@
        html_root_url = "http://doc.rust-lang.org/nightly/")]
 
 #![allow(unknown_features)]
-#![feature(macro_rules, globs, default_type_params, phase, slicing_syntax)]
+#![feature(slicing_syntax)]
 #![feature(quote, unsafe_destructor)]
-#![feature(unboxed_closures)]
-#![feature(old_orphan_check)]
-#![feature(associated_types)]
 
 extern crate arena;
 extern crate fmt_macros;
 extern crate serialize;
 extern crate term;
 extern crate libc;
-
-#[cfg(stage0)]
-#[phase(plugin, link)]
-extern crate log;
-
-#[cfg(not(stage0))]
-#[macro_use]
-extern crate log;
+#[macro_use] extern crate log;
 
 extern crate "serialize" as rustc_serialize; // used by deriving
 
diff --git a/src/libsyntax/owned_slice.rs b/src/libsyntax/owned_slice.rs
index 2a27431a086..707e540a17b 100644
--- a/src/libsyntax/owned_slice.rs
+++ b/src/libsyntax/owned_slice.rs
@@ -82,31 +82,12 @@ impl<T> FromIterator<T> for OwnedSlice<T> {
     }
 }
 
-#[cfg(stage0)]
-impl<S: Encoder<E>, T: Encodable<S, E>, E> Encodable<S, E> for OwnedSlice<T> {
-    fn encode(&self, s: &mut S) -> Result<(), E> {
-       self.as_slice().encode(s)
-    }
-}
-
-#[cfg(not(stage0))]
 impl<T: Encodable> Encodable for OwnedSlice<T> {
     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
        self.as_slice().encode(s)
     }
 }
 
-#[cfg(stage0)]
-impl<D: Decoder<E>, T: Decodable<D, E>, E> Decodable<D, E> for OwnedSlice<T> {
-    fn decode(d: &mut D) -> Result<OwnedSlice<T>, E> {
-        Ok(OwnedSlice::from_vec(match Decodable::decode(d) {
-            Ok(t) => t,
-            Err(e) => return Err(e)
-        }))
-    }
-}
-
-#[cfg(not(stage0))]
 impl<T: Decodable> Decodable for OwnedSlice<T> {
     fn decode<D: Decoder>(d: &mut D) -> Result<OwnedSlice<T>, D::Error> {
         Ok(OwnedSlice::from_vec(match Decodable::decode(d) {
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index 82e2c8136a4..3335566801a 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -24,8 +24,7 @@ use std::num::Int;
 use std::str;
 use std::iter;
 
-#[cfg_attr(stage0, macro_escape)]
-#[cfg_attr(not(stage0), macro_use)]
+#[macro_use]
 pub mod parser;
 
 pub mod lexer;
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 306ab303411..bdf96104697 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -684,29 +684,12 @@ impl<'a> PartialEq<InternedString > for &'a str {
     }
 }
 
-#[cfg(stage0)]
-impl<D:Decoder<E>, E> Decodable<D, E> for InternedString {
-    fn decode(d: &mut D) -> Result<InternedString, E> {
-        Ok(get_name(get_ident_interner().intern(
-                    try!(d.read_str()).index(&FullRange))))
-    }
-}
-
-#[cfg(not(stage0))]
 impl Decodable for InternedString {
     fn decode<D: Decoder>(d: &mut D) -> Result<InternedString, D::Error> {
         Ok(get_name(get_ident_interner().intern(try!(d.read_str()).index(&FullRange))))
     }
 }
 
-#[cfg(stage0)]
-impl<S:Encoder<E>, E> Encodable<S, E> for InternedString {
-    fn encode(&self, s: &mut S) -> Result<(), E> {
-        s.emit_str(self.string.index(&FullRange))
-    }
-}
-
-#[cfg(not(stage0))]
 impl Encodable for InternedString {
     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
         s.emit_str(self.string.index(&FullRange))
diff --git a/src/libsyntax/ptr.rs b/src/libsyntax/ptr.rs
index 13eda7bb88f..8abb46011e6 100644
--- a/src/libsyntax/ptr.rs
+++ b/src/libsyntax/ptr.rs
@@ -111,28 +111,12 @@ impl<S, T: Hash<S>> Hash<S> for P<T> {
     }
 }
 
-#[cfg(stage0)]
-impl<E, D: Decoder<E>, T: 'static + Decodable<D, E>> Decodable<D, E> for P<T> {
-    fn decode(d: &mut D) -> Result<P<T>, E> {
-        Decodable::decode(d).map(P)
-    }
-}
-
-#[cfg(not(stage0))]
 impl<T: 'static + Decodable> Decodable for P<T> {
     fn decode<D: Decoder>(d: &mut D) -> Result<P<T>, D::Error> {
         Decodable::decode(d).map(P)
     }
 }
 
-#[cfg(stage0)]
-impl<E, S: Encoder<E>, T: Encodable<S, E>> Encodable<S, E> for P<T> {
-    fn encode(&self, s: &mut S) -> Result<(), E> {
-        (**self).encode(s)
-    }
-}
-
-#[cfg(not(stage0))]
 impl<T: Encodable> Encodable for P<T> {
     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
         (**self).encode(s)