about summary refs log tree commit diff
path: root/src/libsyntax/ext/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/ext/build.rs')
-rw-r--r--src/libsyntax/ext/build.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs
index 68b011e4fd7..0388115d7ef 100644
--- a/src/libsyntax/ext/build.rs
+++ b/src/libsyntax/ext/build.rs
@@ -46,7 +46,7 @@ pub trait AstBuilder {
     fn ty_mt(&self, ty: @ast::Ty, mutbl: ast::mutability) -> ast::mt;
 
     fn ty(&self, span: span, ty: ast::ty_) -> @ast::Ty;
-    fn ty_path(&self, ast::Path, @Option<OptVec<ast::TyParamBound>>) -> @ast::Ty;
+    fn ty_path(&self, ast::Path, Option<OptVec<ast::TyParamBound>>) -> @ast::Ty;
     fn ty_ident(&self, span: span, idents: ast::ident) -> @ast::Ty;
 
     fn ty_rptr(&self, span: span,
@@ -66,7 +66,7 @@ pub trait AstBuilder {
     fn ty_field_imm(&self, span: span, name: ident, ty: @ast::Ty) -> ast::ty_field;
     fn strip_bounds(&self, bounds: &Generics) -> Generics;
 
-    fn typaram(&self, id: ast::ident, bounds: @OptVec<ast::TyParamBound>) -> ast::TyParam;
+    fn typaram(&self, id: ast::ident, bounds: OptVec<ast::TyParamBound>) -> ast::TyParam;
 
     fn trait_ref(&self, path: ast::Path) -> ast::trait_ref;
     fn typarambound(&self, path: ast::Path) -> ast::TyParamBound;
@@ -265,7 +265,7 @@ impl AstBuilder for @ExtCtxt {
         }
     }
 
-    fn ty_path(&self, path: ast::Path, bounds: @Option<OptVec<ast::TyParamBound>>)
+    fn ty_path(&self, path: ast::Path, bounds: Option<OptVec<ast::TyParamBound>>)
               -> @ast::Ty {
         self.ty(path.span,
                 ast::ty_path(path, bounds, self.next_id()))
@@ -275,7 +275,7 @@ impl AstBuilder for @ExtCtxt {
     // to generate a bounded existential trait type.
     fn ty_ident(&self, span: span, ident: ast::ident)
         -> @ast::Ty {
-        self.ty_path(self.path_ident(span, ident), @None)
+        self.ty_path(self.path_ident(span, ident), None)
     }
 
     fn ty_rptr(&self,
@@ -305,8 +305,7 @@ impl AstBuilder for @ExtCtxt {
                               self.ident_of("Option")
                           ],
                           None,
-                          ~[ ty ]),
-            @None)
+                          ~[ ty ]), None)
     }
 
     fn ty_field_imm(&self, span: span, name: ident, ty: @ast::Ty) -> ast::ty_field {
@@ -329,7 +328,7 @@ impl AstBuilder for @ExtCtxt {
         }
     }
 
-    fn typaram(&self, id: ast::ident, bounds: @OptVec<ast::TyParamBound>) -> ast::TyParam {
+    fn typaram(&self, id: ast::ident, bounds: OptVec<ast::TyParamBound>) -> ast::TyParam {
         ast::TyParam { ident: id, id: self.next_id(), bounds: bounds }
     }
 
@@ -344,13 +343,12 @@ impl AstBuilder for @ExtCtxt {
     fn ty_vars_global(&self, ty_params: &OptVec<ast::TyParam>) -> ~[@ast::Ty] {
         opt_vec::take_vec(
             ty_params.map(|p| self.ty_path(
-                self.path_global(dummy_sp(), ~[p.ident]), @None)))
+                self.path_global(dummy_sp(), ~[p.ident]), None)))
     }
 
     fn strip_bounds(&self, generics: &Generics) -> Generics {
-        let no_bounds = @opt_vec::Empty;
         let new_params = do generics.ty_params.map |ty_param| {
-            ast::TyParam { bounds: no_bounds, ..copy *ty_param }
+            ast::TyParam { bounds: opt_vec::Empty, ..copy *ty_param }
         };
         Generics {
             ty_params: new_params,