about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-12-31 12:55:39 -0800
committerPatrick Walton <pcwalton@mimiga.net>2014-01-03 14:02:01 -0800
commit82a09b9a04cb72088e2ec0bd66810445efba5c2e (patch)
tree65c6cfdf535419182323133e8e524f177046e18d /src/libsyntax/ext
parent88281290ffdf79d1c3700935a3116fb1a22f458f (diff)
downloadrust-82a09b9a04cb72088e2ec0bd66810445efba5c2e.tar.gz
rust-82a09b9a04cb72088e2ec0bd66810445efba5c2e.zip
librustc: Remove `@mut` support from the parser
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/build.rs11
-rw-r--r--src/libsyntax/ext/deriving/ty.rs8
2 files changed, 10 insertions, 9 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs
index 1a3513ab81c..481472e8f0b 100644
--- a/src/libsyntax/ext/build.rs
+++ b/src/libsyntax/ext/build.rs
@@ -54,7 +54,7 @@ pub trait AstBuilder {
                lifetime: Option<ast::Lifetime>,
                mutbl: ast::Mutability) -> P<ast::Ty>;
     fn ty_uniq(&self, span: Span, ty: P<ast::Ty>) -> P<ast::Ty>;
-    fn ty_box(&self, span: Span, ty: P<ast::Ty>, mutbl: ast::Mutability) -> P<ast::Ty>;
+    fn ty_box(&self, span: Span, ty: P<ast::Ty>) -> P<ast::Ty>;
 
     fn ty_option(&self, ty: P<ast::Ty>) -> P<ast::Ty>;
     fn ty_infer(&self, sp: Span) -> P<ast::Ty>;
@@ -311,12 +311,13 @@ impl AstBuilder for ExtCtxt {
         self.ty(span,
                 ast::ty_rptr(lifetime, self.ty_mt(ty, mutbl)))
     }
+
     fn ty_uniq(&self, span: Span, ty: P<ast::Ty>) -> P<ast::Ty> {
         self.ty(span, ast::ty_uniq(ty))
     }
-    fn ty_box(&self, span: Span,
-                 ty: P<ast::Ty>, mutbl: ast::Mutability) -> P<ast::Ty> {
-        self.ty(span, ast::ty_box(self.ty_mt(ty, mutbl)))
+
+    fn ty_box(&self, span: Span, ty: P<ast::Ty>) -> P<ast::Ty> {
+        self.ty(span, ast::ty_box(ty))
     }
 
     fn ty_option(&self, ty: P<ast::Ty>) -> P<ast::Ty> {
@@ -494,7 +495,7 @@ impl AstBuilder for ExtCtxt {
     }
 
     fn expr_managed(&self, sp: Span, e: @ast::Expr) -> @ast::Expr {
-        self.expr_unary(sp, ast::UnBox(ast::MutImmutable), e)
+        self.expr_unary(sp, ast::UnBox, e)
     }
 
     fn expr_field_access(&self, sp: Span, expr: @ast::Expr, ident: ast::Ident) -> @ast::Expr {
diff --git a/src/libsyntax/ext/deriving/ty.rs b/src/libsyntax/ext/deriving/ty.rs
index 10e07520a84..89bed626c1e 100644
--- a/src/libsyntax/ext/deriving/ty.rs
+++ b/src/libsyntax/ext/deriving/ty.rs
@@ -24,7 +24,7 @@ use opt_vec::OptVec;
 /// The types of pointers
 pub enum PtrTy<'a> {
     Send, // ~
-    Managed(ast::Mutability), // @[mut]
+    Managed, // @
     Borrowed(Option<&'a str>, ast::Mutability), // &['lifetime] [mut]
 }
 
@@ -138,8 +138,8 @@ impl<'a> Ty<'a> {
                     Send => {
                         cx.ty_uniq(span, raw_ty)
                     }
-                    Managed(mutbl) => {
-                        cx.ty_box(span, raw_ty, mutbl)
+                    Managed => {
+                        cx.ty_box(span, raw_ty)
                     }
                     Borrowed(ref lt, mutbl) => {
                         let lt = mk_lifetime(cx, span, lt);
@@ -251,7 +251,7 @@ pub fn get_explicit_self(cx: &ExtCtxt, span: Span, self_ptr: &Option<PtrTy>)
                 span,
                 match *ptr {
                     Send => ast::sty_uniq(ast::MutImmutable),
-                    Managed(mutbl) => ast::sty_box(mutbl),
+                    Managed => ast::sty_box(ast::MutImmutable),
                     Borrowed(ref lt, mutbl) => {
                         let lt = lt.map(|s| cx.lifetime(span, cx.ident_of(s)));
                         ast::sty_region(lt, mutbl)