about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-12-16 21:44:33 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-12-18 00:52:56 +0300
commit0d298f9904468b8f668cb9b505c19d64fdeb7633 (patch)
tree7e65ebcb1ef74ec027cf31b2135b92f3a80e99ac /src/libsyntax/ext
parent09d4a436a748a39f13d2d6d6c6ba56a885bb0d0c (diff)
downloadrust-0d298f9904468b8f668cb9b505c19d64fdeb7633.tar.gz
rust-0d298f9904468b8f668cb9b505c19d64fdeb7633.zip
Deprecate name `OwnedSlice` and don't use it
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/build.rs25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs
index cdc9cb02453..46a39b98058 100644
--- a/src/libsyntax/ext/build.rs
+++ b/src/libsyntax/ext/build.rs
@@ -14,7 +14,6 @@ use ast;
 use attr;
 use codemap::{Span, respan, Spanned, DUMMY_SP, Pos};
 use ext::base::ExtCtxt;
-use owned_slice::OwnedSlice;
 use parse::token::special_idents;
 use parse::token::InternedString;
 use parse::token;
@@ -56,7 +55,7 @@ pub trait AstBuilder {
 
     fn ty(&self, span: Span, ty: ast::Ty_) -> P<ast::Ty>;
     fn ty_path(&self, ast::Path) -> P<ast::Ty>;
-    fn ty_sum(&self, ast::Path, OwnedSlice<ast::TyParamBound>) -> P<ast::Ty>;
+    fn ty_sum(&self, ast::Path, ast::TyParamBounds) -> P<ast::Ty>;
     fn ty_ident(&self, span: Span, idents: ast::Ident) -> P<ast::Ty>;
 
     fn ty_rptr(&self, span: Span,
@@ -70,13 +69,13 @@ pub trait AstBuilder {
     fn ty_option(&self, ty: P<ast::Ty>) -> P<ast::Ty>;
     fn ty_infer(&self, sp: Span) -> P<ast::Ty>;
 
-    fn ty_vars(&self, ty_params: &OwnedSlice<ast::TyParam>) -> Vec<P<ast::Ty>> ;
-    fn ty_vars_global(&self, ty_params: &OwnedSlice<ast::TyParam>) -> Vec<P<ast::Ty>> ;
+    fn ty_vars(&self, ty_params: &P<[ast::TyParam]>) -> Vec<P<ast::Ty>> ;
+    fn ty_vars_global(&self, ty_params: &P<[ast::TyParam]>) -> Vec<P<ast::Ty>> ;
 
     fn typaram(&self,
                span: Span,
                id: ast::Ident,
-               bounds: OwnedSlice<ast::TyParamBound>,
+               bounds: ast::TyParamBounds,
                default: Option<P<ast::Ty>>) -> ast::TyParam;
 
     fn trait_ref(&self, path: ast::Path) -> ast::TraitRef;
@@ -331,8 +330,8 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
             identifier: last_identifier,
             parameters: ast::AngleBracketedParameters(ast::AngleBracketedParameterData {
                 lifetimes: lifetimes,
-                types: OwnedSlice::from_vec(types),
-                bindings: OwnedSlice::from_vec(bindings),
+                types: P::from_vec(types),
+                bindings: P::from_vec(bindings),
             })
         });
         ast::Path {
@@ -369,8 +368,8 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
             identifier: ident,
             parameters: ast::AngleBracketedParameters(ast::AngleBracketedParameterData {
                 lifetimes: lifetimes,
-                types: OwnedSlice::from_vec(types),
-                bindings: OwnedSlice::from_vec(bindings),
+                types: P::from_vec(types),
+                bindings: P::from_vec(bindings),
             })
         });
 
@@ -399,7 +398,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
         self.ty(path.span, ast::TyPath(None, path))
     }
 
-    fn ty_sum(&self, path: ast::Path, bounds: OwnedSlice<ast::TyParamBound>) -> P<ast::Ty> {
+    fn ty_sum(&self, path: ast::Path, bounds: ast::TyParamBounds) -> P<ast::Ty> {
         self.ty(path.span,
                 ast::TyObjectSum(self.ty_path(path),
                                  bounds))
@@ -448,7 +447,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
     fn typaram(&self,
                span: Span,
                id: ast::Ident,
-               bounds: OwnedSlice<ast::TyParamBound>,
+               bounds: ast::TyParamBounds,
                default: Option<P<ast::Ty>>) -> ast::TyParam {
         ast::TyParam {
             ident: id,
@@ -462,11 +461,11 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
     // these are strange, and probably shouldn't be used outside of
     // pipes. Specifically, the global version possible generates
     // incorrect code.
-    fn ty_vars(&self, ty_params: &OwnedSlice<ast::TyParam>) -> Vec<P<ast::Ty>> {
+    fn ty_vars(&self, ty_params: &P<[ast::TyParam]>) -> Vec<P<ast::Ty>> {
         ty_params.iter().map(|p| self.ty_ident(DUMMY_SP, p.ident)).collect()
     }
 
-    fn ty_vars_global(&self, ty_params: &OwnedSlice<ast::TyParam>) -> Vec<P<ast::Ty>> {
+    fn ty_vars_global(&self, ty_params: &P<[ast::TyParam]>) -> Vec<P<ast::Ty>> {
         ty_params
             .iter()
             .map(|p| self.ty_path(self.path_global(DUMMY_SP, vec!(p.ident))))