From e2f97f51ad4cf902e5a5835b5332447fe59089c4 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 6 Jan 2015 09:24:46 -0800 Subject: 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 --- src/libsyntax/ast.rs | 16 ---------------- src/libsyntax/codemap.rs | 17 ----------------- src/libsyntax/ext/deriving/generic/mod.rs | 10 +++++----- src/libsyntax/ext/deriving/mod.rs | 2 +- src/libsyntax/feature_gate.rs | 2 +- src/libsyntax/lib.rs | 14 ++------------ src/libsyntax/owned_slice.rs | 19 ------------------- src/libsyntax/parse/mod.rs | 3 +-- src/libsyntax/parse/token.rs | 17 ----------------- src/libsyntax/ptr.rs | 16 ---------------- 10 files changed, 10 insertions(+), 106 deletions(-) (limited to 'src/libsyntax') 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, E> Encodable 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(&self, s: &mut S) -> Result<(), S::Error> { s.emit_str(token::get_ident(*self).get()) } } -#[cfg(stage0)] -impl, E> Decodable for Ident { - fn decode(d: &mut D) -> Result { - Ok(str_to_ident(try!(d.read_str()).index(&FullRange))) - } -} - -#[cfg(not(stage0))] impl Decodable for Ident { fn decode(d: &mut D) -> Result { 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, E> Encodable 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(&self, s: &mut S) -> Result<(), S::Error> { @@ -136,14 +127,6 @@ impl Encodable for Span { } } -#[cfg(stage0)] -impl, E> Decodable for Span { - fn decode(_d: &mut D) -> Result { - Ok(DUMMY_SP) - } -} - -#[cfg(not(stage0))] impl Decodable for Span { fn decode(_d: &mut D) -> Result { 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(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(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 FromIterator for OwnedSlice { } } -#[cfg(stage0)] -impl, T: Encodable, E> Encodable for OwnedSlice { - fn encode(&self, s: &mut S) -> Result<(), E> { - self.as_slice().encode(s) - } -} - -#[cfg(not(stage0))] impl Encodable for OwnedSlice { fn encode(&self, s: &mut S) -> Result<(), S::Error> { self.as_slice().encode(s) } } -#[cfg(stage0)] -impl, T: Decodable, E> Decodable for OwnedSlice { - fn decode(d: &mut D) -> Result, E> { - Ok(OwnedSlice::from_vec(match Decodable::decode(d) { - Ok(t) => t, - Err(e) => return Err(e) - })) - } -} - -#[cfg(not(stage0))] impl Decodable for OwnedSlice { fn decode(d: &mut D) -> Result, 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 for &'a str { } } -#[cfg(stage0)] -impl, E> Decodable for InternedString { - fn decode(d: &mut D) -> Result { - Ok(get_name(get_ident_interner().intern( - try!(d.read_str()).index(&FullRange)))) - } -} - -#[cfg(not(stage0))] impl Decodable for InternedString { fn decode(d: &mut D) -> Result { Ok(get_name(get_ident_interner().intern(try!(d.read_str()).index(&FullRange)))) } } -#[cfg(stage0)] -impl, E> Encodable 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(&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> Hash for P { } } -#[cfg(stage0)] -impl, T: 'static + Decodable> Decodable for P { - fn decode(d: &mut D) -> Result, E> { - Decodable::decode(d).map(P) - } -} - -#[cfg(not(stage0))] impl Decodable for P { fn decode(d: &mut D) -> Result, D::Error> { Decodable::decode(d).map(P) } } -#[cfg(stage0)] -impl, T: Encodable> Encodable for P { - fn encode(&self, s: &mut S) -> Result<(), E> { - (**self).encode(s) - } -} - -#[cfg(not(stage0))] impl Encodable for P { fn encode(&self, s: &mut S) -> Result<(), S::Error> { (**self).encode(s) -- cgit 1.4.1-3-g733a5