about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs2
-rw-r--r--src/libsyntax/ast_map.rs2
-rw-r--r--src/libsyntax/ast_util.rs2
-rw-r--r--src/libsyntax/attr.rs2
-rw-r--r--src/libsyntax/ext/asm.rs2
-rw-r--r--src/libsyntax/ext/base.rs2
-rw-r--r--src/libsyntax/ext/build.rs2
-rw-r--r--src/libsyntax/ext/concat_idents.rs2
-rw-r--r--src/libsyntax/ext/deriving/generic/mod.rs2
-rw-r--r--src/libsyntax/ext/deriving/mod.rs1
-rw-r--r--src/libsyntax/ext/expand.rs4
-rw-r--r--src/libsyntax/ext/format.rs2
-rw-r--r--src/libsyntax/ext/quote.rs9
-rw-r--r--src/libsyntax/ext/tt/macro_parser.rs1
-rw-r--r--src/libsyntax/fold.rs2
-rw-r--r--src/libsyntax/lib.rs9
-rw-r--r--src/libsyntax/parse/attr.rs2
-rw-r--r--src/libsyntax/parse/mod.rs1
-rw-r--r--src/libsyntax/parse/obsolete.rs12
-rw-r--r--src/libsyntax/parse/parser.rs7
-rw-r--r--src/libsyntax/util/parser_testing.rs10
21 files changed, 41 insertions, 37 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index b8e08dab722..08f412cd763 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -21,7 +21,7 @@ use std::fmt;
 use std::fmt::Show;
 use std::option::Option;
 use std::rc::Rc;
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 use serialize::{Encodable, Decodable, Encoder, Decoder};
 
 /// A pointer abstraction. FIXME(eddyb) #10676 use Rc<T> in the future.
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs
index d78c9c2edc3..828e9ab12c2 100644
--- a/src/libsyntax/ast_map.rs
+++ b/src/libsyntax/ast_map.rs
@@ -20,7 +20,7 @@ use util::small_vector::SmallVector;
 
 use std::cell::RefCell;
 use std::fmt;
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 use std::iter;
 use std::slice;
 
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs
index 8e0a2218ea3..372f69b805a 100644
--- a/src/libsyntax/ast_util.rs
+++ b/src/libsyntax/ast_util.rs
@@ -21,7 +21,7 @@ use visit;
 
 use std::cell::Cell;
 use std::cmp;
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 use std::u32;
 
 pub fn path_name_i(idents: &[Ident]) -> String {
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs
index 83f1326c656..31dd07f463c 100644
--- a/src/libsyntax/attr.rs
+++ b/src/libsyntax/attr.rs
@@ -22,7 +22,7 @@ use crateid::CrateId;
 
 use std::collections::HashSet;
 use std::collections::BitvSet;
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 
 local_data_key!(used_attrs: BitvSet)
 
diff --git a/src/libsyntax/ext/asm.rs b/src/libsyntax/ext/asm.rs
index a982e4c1034..7aa93dee11d 100644
--- a/src/libsyntax/ext/asm.rs
+++ b/src/libsyntax/ext/asm.rs
@@ -20,6 +20,8 @@ use parse;
 use parse::token::InternedString;
 use parse::token;
 
+use std::gc::GC;
+
 enum State {
     Asm,
     Outputs,
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs
index 7ba517a3aed..421f8b1294d 100644
--- a/src/libsyntax/ext/base.rs
+++ b/src/libsyntax/ext/base.rs
@@ -20,7 +20,7 @@ use parse::token::{InternedString, intern, str_to_ident};
 use util::small_vector::SmallVector;
 
 use std::collections::HashMap;
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 
 // new-style macro! tt code:
 //
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs
index 4ef7796c454..b99ab50c326 100644
--- a/src/libsyntax/ext/build.rs
+++ b/src/libsyntax/ext/build.rs
@@ -21,7 +21,7 @@ use parse::token::special_idents;
 use parse::token::InternedString;
 use parse::token;
 
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 
 // Transitional reexports so qquote can find the paths it is looking for
 mod syntax {
diff --git a/src/libsyntax/ext/concat_idents.rs b/src/libsyntax/ext/concat_idents.rs
index 3522095ed70..7cf901bbd5e 100644
--- a/src/libsyntax/ext/concat_idents.rs
+++ b/src/libsyntax/ext/concat_idents.rs
@@ -16,7 +16,7 @@ use owned_slice::OwnedSlice;
 use parse::token;
 use parse::token::{str_to_ident};
 
-use std::string::String;
+use std::gc::GC;
 
 pub fn expand_syntax_ext(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
                          -> Box<base::MacResult> {
diff --git a/src/libsyntax/ext/deriving/generic/mod.rs b/src/libsyntax/ext/deriving/generic/mod.rs
index 251eae75ee5..05269dbb44d 100644
--- a/src/libsyntax/ext/deriving/generic/mod.rs
+++ b/src/libsyntax/ext/deriving/generic/mod.rs
@@ -178,7 +178,7 @@ StaticEnum(<ast::EnumDef of C>, ~[(<ident of C0>, <span of C0>, Unnamed(~[<span
 */
 
 use std::cell::RefCell;
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 
 use ast;
 use ast::{P, EnumDef, Expr, Ident, Generics, StructDef};
diff --git a/src/libsyntax/ext/deriving/mod.rs b/src/libsyntax/ext/deriving/mod.rs
index 1833e56dbfb..edfe54db0c7 100644
--- a/src/libsyntax/ext/deriving/mod.rs
+++ b/src/libsyntax/ext/deriving/mod.rs
@@ -79,7 +79,6 @@ pub fn expand_meta_deriving(cx: &mut ExtCtxt,
                             "Encodable" => expand!(encodable::expand_deriving_encodable),
                             "Decodable" => expand!(decodable::expand_deriving_decodable),
 
-                            // NOTE: after a stage0 snap this needs treatment
                             "PartialEq" => expand!(eq::expand_deriving_eq),
                             "Eq" => expand!(totaleq::expand_deriving_totaleq),
                             "PartialOrd" => expand!(ord::expand_deriving_ord),
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index fffaa12fa1f..fb2de2e271a 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -29,7 +29,7 @@ use visit;
 use visit::Visitor;
 use util::small_vector::SmallVector;
 
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 
 pub fn expand_expr(e: Gc<ast::Expr>, fld: &mut MacroExpander) -> Gc<ast::Expr> {
     match e.node {
@@ -1030,6 +1030,8 @@ mod test {
     use visit;
     use visit::Visitor;
 
+    use std::gc::GC;
+
     // a visitor that extracts the paths
     // from a given thingy and puts them in a mutable
     // array (passed in to the traversal)
diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs
index ca7596925a9..33ea186db35 100644
--- a/src/libsyntax/ext/format.rs
+++ b/src/libsyntax/ext/format.rs
@@ -20,7 +20,7 @@ use rsparse = parse;
 
 use parse = fmt_macros;
 use std::collections::HashMap;
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 
 #[deriving(PartialEq)]
 enum ArgumentType {
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs
index 4f1e2ab356e..6514d8fa418 100644
--- a/src/libsyntax/ext/quote.rs
+++ b/src/libsyntax/ext/quote.rs
@@ -37,17 +37,8 @@ pub mod rt {
     use parse;
     use print::pprust;
 
-    #[cfg(not(stage0))]
     use ast::{TokenTree, Generics, Expr};
 
-    // NOTE remove this after snapshot
-    // (stage0 quasiquoter needs this)
-    #[cfg(stage0)]
-    pub use ast::{Generics, TokenTree, TTTok};
-    #[cfg(stage0)]
-    pub use parse::token::{IDENT, SEMI, LBRACE, RBRACE, LIFETIME, COLON, AND, BINOP, EQ,
-                           LBRACKET, RBRACKET, LPAREN, RPAREN, POUND, NOT, MOD_SEP, DOT, COMMA};
-
     pub use parse::new_parser_from_tts;
     pub use codemap::{BytePos, Span, dummy_spanned};
 
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs
index 85035a8d38e..86fbc8cec2a 100644
--- a/src/libsyntax/ext/tt/macro_parser.rs
+++ b/src/libsyntax/ext/tt/macro_parser.rs
@@ -22,6 +22,7 @@ use parse::token::{Token, EOF, Nonterminal};
 use parse::token;
 
 use std::rc::Rc;
+use std::gc::GC;
 use std::collections::HashMap;
 
 /* This is an Earley-like parser, without support for in-grammar nonterminals,
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs
index d61a79e4e80..2e538c9579b 100644
--- a/src/libsyntax/fold.rs
+++ b/src/libsyntax/fold.rs
@@ -17,7 +17,7 @@ use owned_slice::OwnedSlice;
 use util::small_vector::SmallVector;
 
 use std::rc::Rc;
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 
 // We may eventually want to be able to fold over type parameters, too.
 pub trait Folder {
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs
index 754518f5fea..8a66f0e6846 100644
--- a/src/libsyntax/lib.rs
+++ b/src/libsyntax/lib.rs
@@ -32,14 +32,7 @@ This API is completely unstable and subject to change.
 
 extern crate serialize;
 extern crate term;
-
-#[cfg(stage0)]
-#[phase(syntax, link)]
-extern crate log;
-
-#[cfg(not(stage0))]
-#[phase(plugin, link)]
-extern crate log;
+#[phase(plugin, link)] extern crate log;
 
 extern crate fmt_macros;
 extern crate debug;
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs
index c9122e3ceaf..f48ddf4417b 100644
--- a/src/libsyntax/parse/attr.rs
+++ b/src/libsyntax/parse/attr.rs
@@ -16,7 +16,7 @@ use parse::token;
 use parse::parser::Parser;
 use parse::token::INTERPOLATED;
 
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 
 // a parser that can parse attributes.
 pub trait ParserAttr {
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index 1ebcbc8a7d1..faffc496846 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -282,6 +282,7 @@ mod test {
     use std::io;
     use std::io::MemWriter;
     use std::str;
+    use std::gc::GC;
     use codemap::{Span, BytePos, Spanned};
     use owned_slice::OwnedSlice;
     use ast;
diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs
index e280c244929..025684ae71e 100644
--- a/src/libsyntax/parse/obsolete.rs
+++ b/src/libsyntax/parse/obsolete.rs
@@ -22,7 +22,7 @@ use codemap::{Span, respan};
 use parse::parser;
 use parse::token;
 
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 
 /// The specific types of unsupported syntax
 #[deriving(PartialEq, Eq, Hash)]
@@ -31,6 +31,8 @@ pub enum ObsoleteSyntax {
     ObsoleteOwnedExpr,
     ObsoleteOwnedPattern,
     ObsoleteOwnedVector,
+    ObsoleteManagedType,
+    ObsoleteManagedExpr,
 }
 
 pub trait ParserObsoleteMethods {
@@ -68,6 +70,14 @@ impl<'a> ParserObsoleteMethods for parser::Parser<'a> {
                 "`~[T]` is no longer a type",
                 "use the `Vec` type instead"
             ),
+            ObsoleteManagedType => (
+                "`@` notation for managed pointers",
+                "use `Gc<T>` in `std::gc` instead"
+            ),
+            ObsoleteManagedExpr => (
+                "`@` notation for a managed pointer allocation",
+                "use the `box(GC)` oeprator instead of `@`"
+            ),
         };
 
         self.report(sp, kind, kind_str, desc);
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 250ed4af571..ae3b8587ee5 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -79,7 +79,7 @@ use owned_slice::OwnedSlice;
 use std::collections::HashSet;
 use std::mem::replace;
 use std::rc::Rc;
-use std::gc::Gc;
+use std::gc::{Gc, GC};
 
 #[allow(non_camel_case_types)]
 #[deriving(PartialEq)]
@@ -1342,6 +1342,8 @@ impl<'a> Parser<'a> {
         } else if self.token == token::AT {
             // MANAGED POINTER
             self.bump();
+            let span = self.last_span;
+            self.obsolete(span, ObsoleteManagedType);
             TyBox(self.parse_ty(plus_allowed))
         } else if self.token == token::TILDE {
             // OWNED POINTER
@@ -2375,9 +2377,10 @@ impl<'a> Parser<'a> {
           }
           token::AT => {
             self.bump();
+            let span = self.last_span;
+            self.obsolete(span, ObsoleteManagedExpr);
             let e = self.parse_prefix_expr();
             hi = e.span.hi;
-            // HACK: pretending @[] is a (removed) @-vec
             ex = self.mk_unary(UnBox, e);
           }
           token::TILDE => {
diff --git a/src/libsyntax/util/parser_testing.rs b/src/libsyntax/util/parser_testing.rs
index 1417cb5e857..04116dec60e 100644
--- a/src/libsyntax/util/parser_testing.rs
+++ b/src/libsyntax/util/parser_testing.rs
@@ -15,6 +15,8 @@ use parse::{new_parser_from_source_str};
 use parse::parser::Parser;
 use parse::token;
 
+use std::gc::Gc;
+
 // map a string to tts, using a made-up filename:
 pub fn string_to_tts(source_str: String) -> Vec<ast::TokenTree> {
     let ps = new_parse_sess();
@@ -46,21 +48,21 @@ pub fn string_to_crate (source_str : String) -> ast::Crate {
 }
 
 // parse a string, return an expr
-pub fn string_to_expr (source_str : String) -> @ast::Expr {
+pub fn string_to_expr (source_str : String) -> Gc<ast::Expr> {
     with_error_checking_parse(source_str, |p| {
         p.parse_expr()
     })
 }
 
 // parse a string, return an item
-pub fn string_to_item (source_str : String) -> Option<@ast::Item> {
+pub fn string_to_item (source_str : String) -> Option<Gc<ast::Item>> {
     with_error_checking_parse(source_str, |p| {
         p.parse_item(Vec::new())
     })
 }
 
 // parse a string, return a stmt
-pub fn string_to_stmt(source_str : String) -> @ast::Stmt {
+pub fn string_to_stmt(source_str : String) -> Gc<ast::Stmt> {
     with_error_checking_parse(source_str, |p| {
         p.parse_stmt(Vec::new())
     })
@@ -68,7 +70,7 @@ pub fn string_to_stmt(source_str : String) -> @ast::Stmt {
 
 // parse a string, return a pat. Uses "irrefutable"... which doesn't
 // (currently) affect parsing.
-pub fn string_to_pat(source_str: String) -> @ast::Pat {
+pub fn string_to_pat(source_str: String) -> Gc<ast::Pat> {
     string_to_parser(&new_parse_sess(), source_str).parse_pat()
 }