diff options
| author | bors <bors@rust-lang.org> | 2014-10-03 05:02:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-03 05:02:37 +0000 |
| commit | aa034cd3bac3155e0f6c74c399314b5ee32f88fc (patch) | |
| tree | 891acff8f9158a69e1884707ca3bfb70d749db2e /src/libsyntax | |
| parent | d0af3feebb57bc58c52de69ab51f92dc7082500b (diff) | |
| parent | d911936dbdc645133ad9605f45d2bf10b73e2b20 (diff) | |
| download | rust-aa034cd3bac3155e0f6c74c399314b5ee32f88fc.tar.gz rust-aa034cd3bac3155e0f6c74c399314b5ee32f88fc.zip | |
auto merge of #17725 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ast_util.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/ext/build.rs | 5 | ||||
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 14 | ||||
| -rw-r--r-- | src/libsyntax/fold.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/parse/obsolete.rs | 10 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 19 | ||||
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/test.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/visit.rs | 2 |
10 files changed, 4 insertions, 55 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 59c824d0eae..0a87c0a344e 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -416,7 +416,6 @@ pub enum BinOp { #[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)] pub enum UnOp { - UnBox, UnUniq, UnDeref, UnNot, @@ -953,7 +952,6 @@ pub struct UnboxedFnTy { pub enum Ty_ { TyNil, TyBot, /* bottom type */ - TyBox(P<Ty>), TyUniq(P<Ty>), TyVec(P<Ty>), TyFixedLengthVec(P<Ty>, P<Expr>), diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs index 6d61c851476..31860062580 100644 --- a/src/libsyntax/ast_util.rs +++ b/src/libsyntax/ast_util.rs @@ -90,7 +90,6 @@ pub fn is_shift_binop(b: BinOp) -> bool { pub fn unop_to_string(op: UnOp) -> &'static str { match op { - UnBox => "box(GC) ", UnUniq => "box() ", UnDeref => "*", UnNot => "!", diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index f2b806f43cc..1fdb6dd505f 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -112,7 +112,6 @@ pub trait AstBuilder { fn expr_deref(&self, sp: Span, e: P<ast::Expr>) -> P<ast::Expr>; fn expr_unary(&self, sp: Span, op: ast::UnOp, e: P<ast::Expr>) -> P<ast::Expr>; - fn expr_managed(&self, sp: Span, e: P<ast::Expr>) -> P<ast::Expr>; fn expr_addr_of(&self, sp: Span, e: P<ast::Expr>) -> P<ast::Expr>; fn expr_mut_addr_of(&self, sp: Span, e: P<ast::Expr>) -> P<ast::Expr>; fn expr_field_access(&self, span: Span, expr: P<ast::Expr>, ident: ast::Ident) -> P<ast::Expr>; @@ -565,10 +564,6 @@ impl<'a> AstBuilder for ExtCtxt<'a> { self.expr(sp, ast::ExprUnary(op, e)) } - fn expr_managed(&self, sp: Span, e: P<ast::Expr>) -> P<ast::Expr> { - self.expr_unary(sp, ast::UnBox, e) - } - fn expr_field_access(&self, sp: Span, expr: P<ast::Expr>, ident: ast::Ident) -> P<ast::Expr> { let field_name = token::get_ident(ident); let field_span = Span { diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index ca6d488772c..7f6302e6c4c 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -40,7 +40,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[ ("struct_variant", Active), ("once_fns", Active), ("asm", Active), - ("managed_boxes", Active), + ("managed_boxes", Removed), ("non_ascii_idents", Active), ("thread_local", Active), ("link_args", Active), @@ -135,14 +135,6 @@ impl<'a> Context<'a> { } } - fn gate_box(&self, span: Span) { - self.gate_feature("managed_boxes", span, - "The managed box syntax is being replaced by the \ - `std::gc::Gc` and `std::rc::Rc` types. Equivalent \ - functionality to managed trait objects will be \ - implemented but is currently missing."); - } - fn has_feature(&self, feature: &str) -> bool { self.features.iter().any(|n| n.as_slice() == feature) } @@ -330,7 +322,6 @@ impl<'a, 'v> Visitor<'v> for Context<'a> { experimental and likely to be removed"); }, - ast::TyBox(_) => { self.gate_box(t.span); } ast::TyUnboxedFn(..) => { self.gate_feature("unboxed_closure_sugar", t.span, @@ -344,9 +335,6 @@ impl<'a, 'v> Visitor<'v> for Context<'a> { fn visit_expr(&mut self, e: &ast::Expr) { match e.node { - ast::ExprUnary(ast::UnBox, _) => { - self.gate_box(e.span); - } ast::ExprUnboxedFn(..) => { self.gate_feature("unboxed_closures", e.span, diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs index 31bec58a4da..84de6c3b913 100644 --- a/src/libsyntax/fold.rs +++ b/src/libsyntax/fold.rs @@ -372,7 +372,6 @@ pub fn noop_fold_ty<T: Folder>(t: P<Ty>, fld: &mut T) -> P<Ty> { id: fld.new_id(id), node: match node { TyNil | TyBot | TyInfer => node, - TyBox(ty) => TyBox(fld.fold_ty(ty)), TyUniq(ty) => TyUniq(fld.fold_ty(ty)), TyVec(ty) => TyVec(fld.fold_ty(ty)), TyPtr(mt) => TyPtr(fld.fold_mt(mt)), diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs index d47231bc3e2..1a6fb9b85dd 100644 --- a/src/libsyntax/parse/obsolete.rs +++ b/src/libsyntax/parse/obsolete.rs @@ -31,8 +31,6 @@ pub enum ObsoleteSyntax { ObsoleteOwnedPattern, ObsoleteOwnedVector, ObsoleteOwnedSelf, - ObsoleteManagedType, - ObsoleteManagedExpr, ObsoleteImportRenaming, ObsoleteSubsliceMatch, ObsoleteExternCrateRenaming, @@ -77,14 +75,6 @@ impl<'a> ParserObsoleteMethods for parser::Parser<'a> { "`~self` is no longer supported", "write `self: Box<Self>` instead" ), - ObsoleteManagedType => ( - "`@` notation for managed pointers", - "use `Gc<T>` in `std::gc` instead" - ), - ObsoleteManagedExpr => ( - "`@` notation for a managed pointer allocation", - "use the `box(GC)` operator instead of `@`" - ), ObsoleteImportRenaming => ( "`use foo = bar` syntax", "write `use bar as foo` instead" diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index c8f1b7f9a8e..7cce9c2dc3a 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -16,8 +16,7 @@ use ast::{RegionTyParamBound, TraitTyParamBound}; use ast::{ProvidedMethod, Public, FnStyle}; use ast::{Mod, BiAdd, Arg, Arm, Attribute, BindByRef, BindByValue}; use ast::{BiBitAnd, BiBitOr, BiBitXor, BiRem, Block}; -use ast::{BlockCheckMode, UnBox}; -use ast::{CaptureByRef, CaptureByValue, CaptureClause}; +use ast::{BlockCheckMode, CaptureByRef, CaptureByValue, CaptureClause}; use ast::{Crate, CrateConfig, Decl, DeclItem}; use ast::{DeclLocal, DefaultBlock, UnDeref, BiDiv, EMPTY_CTXT, EnumDef, ExplicitSelf}; use ast::{Expr, Expr_, ExprAddrOf, ExprMatch, ExprAgain}; @@ -50,7 +49,7 @@ use ast::{StructVariantKind, BiSub}; use ast::StrStyle; use ast::{SelfExplicit, SelfRegion, SelfStatic, SelfValue}; use ast::{TokenTree, TraitItem, TraitRef, TTDelim, TTSeq, TTTok}; -use ast::{TTNonterminal, TupleVariantKind, Ty, Ty_, TyBot, TyBox}; +use ast::{TTNonterminal, TupleVariantKind, Ty, Ty_, TyBot}; use ast::{TypeField, TyFixedLengthVec, TyClosure, TyProc, TyBareFn}; use ast::{TyTypeof, TyInfer, TypeMethod}; use ast::{TyNil, TyParam, TyParamBound, TyParen, TyPath, TyPtr, TyQPath}; @@ -1450,12 +1449,6 @@ impl<'a> Parser<'a> { t } } - } 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 self.bump(); @@ -2723,14 +2716,6 @@ impl<'a> Parser<'a> { hi = e.span.hi; ex = ExprAddrOf(m, e); } - token::AT => { - self.bump(); - let span = self.last_span; - self.obsolete(span, ObsoleteManagedExpr); - let e = self.parse_prefix_expr(); - hi = e.span.hi; - ex = self.mk_unary(UnBox, e); - } token::TILDE => { self.bump(); let last_span = self.last_span; diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index a8e99b4e85f..8400d9aea3b 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -546,10 +546,6 @@ impl<'a> State<'a> { match ty.node { ast::TyNil => try!(word(&mut self.s, "()")), ast::TyBot => try!(word(&mut self.s, "!")), - ast::TyBox(ref ty) => { - try!(word(&mut self.s, "@")); - try!(self.print_type(&**ty)); - } ast::TyUniq(ref ty) => { try!(word(&mut self.s, "~")); try!(self.print_type(&**ty)); diff --git a/src/libsyntax/test.rs b/src/libsyntax/test.rs index 828a6124aa0..00fdf436636 100644 --- a/src/libsyntax/test.rs +++ b/src/libsyntax/test.rs @@ -13,7 +13,6 @@ #![allow(dead_code)] #![allow(unused_imports)] -use std::gc::{Gc, GC}; use std::slice; use std::mem; use std::vec; diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs index 6fc79e2c42a..249f87d3102 100644 --- a/src/libsyntax/visit.rs +++ b/src/libsyntax/visit.rs @@ -326,7 +326,7 @@ pub fn skip_ty<'v, V: Visitor<'v>>(_: &mut V, _: &'v Ty) { pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) { match typ.node { - TyUniq(ref ty) | TyVec(ref ty) | TyBox(ref ty) | TyParen(ref ty) => { + TyUniq(ref ty) | TyVec(ref ty) | TyParen(ref ty) => { visitor.visit_ty(&**ty) } TyPtr(ref mutable_type) => { |
