about summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-03-20 01:52:37 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2014-03-22 09:54:18 +1100
commite33676b7936b12bb68f47857ab3f8ea9b757d0d5 (patch)
tree64e49bfdfb621bca44056fb4810c4f487f74940b /src/libsyntax/print/pprust.rs
parent0384952a657e49d1f1cbab7c21dee91cd2c4f585 (diff)
downloadrust-e33676b7936b12bb68f47857ab3f8ea9b757d0d5.tar.gz
rust-e33676b7936b12bb68f47857ab3f8ea9b757d0d5.zip
Migrate all users of opt_vec to owned_slice, delete opt_vec.
syntax::opt_vec is now entirely unused, and so can go.
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
-rw-r--r--src/libsyntax/print/pprust.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 1b8f48861aa..9cecd5f6c2b 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -12,8 +12,7 @@ use abi::AbiSet;
 use ast::{P, RegionTyParamBound, TraitTyParamBound, Required, Provided};
 use ast;
 use ast_util;
-use opt_vec::OptVec;
-use opt_vec;
+use owned_slice::OwnedSlice;
 use attr::{AttrMetaMethods, AttributeMethods};
 use codemap::{CodeMap, BytePos};
 use codemap;
@@ -478,7 +477,7 @@ impl<'a> State<'a> {
             ast::TyBareFn(f) => {
                 let generics = ast::Generics {
                     lifetimes: f.lifetimes.clone(),
-                    ty_params: opt_vec::Empty
+                    ty_params: OwnedSlice::empty()
                 };
                 try!(self.print_ty_fn(Some(f.abis), None, &None,
                                    f.purity, ast::Many, f.decl, None, &None,
@@ -487,7 +486,7 @@ impl<'a> State<'a> {
             ast::TyClosure(f) => {
                 let generics = ast::Generics {
                     lifetimes: f.lifetimes.clone(),
-                    ty_params: opt_vec::Empty
+                    ty_params: OwnedSlice::empty()
                 };
                 try!(self.print_ty_fn(None, Some(f.sigil), &f.region,
                                    f.purity, f.onceness, f.decl, None, &f.bounds,
@@ -1518,7 +1517,7 @@ impl<'a> State<'a> {
     fn print_path_(&mut self,
                    path: &ast::Path,
                    colons_before_params: bool,
-                   opt_bounds: &Option<OptVec<ast::TyParamBound>>)
+                   opt_bounds: &Option<OwnedSlice<ast::TyParamBound>>)
         -> IoResult<()> {
         try!(self.maybe_print_comment(path.span.lo));
         if path.global {
@@ -1564,7 +1563,7 @@ impl<'a> State<'a> {
                     }
                     try!(self.commasep(
                         Inconsistent,
-                        segment.types.map_to_vec(|&t| t).as_slice(),
+                        segment.types.as_slice(),
                         |s, ty| s.print_type_ref(ty)));
                 }
 
@@ -1580,7 +1579,7 @@ impl<'a> State<'a> {
     }
 
     fn print_bounded_path(&mut self, path: &ast::Path,
-                          bounds: &Option<OptVec<ast::TyParamBound>>)
+                          bounds: &Option<OwnedSlice<ast::TyParamBound>>)
         -> IoResult<()> {
         self.print_path_(path, false, bounds)
     }
@@ -1826,7 +1825,7 @@ impl<'a> State<'a> {
         self.maybe_print_comment(decl.output.span.lo)
     }
 
-    pub fn print_bounds(&mut self, bounds: &OptVec<ast::TyParamBound>,
+    pub fn print_bounds(&mut self, bounds: &OwnedSlice<ast::TyParamBound>,
                         print_colon_anyway: bool) -> IoResult<()> {
         if !bounds.is_empty() {
             try!(word(&mut self.s, ":"));
@@ -2028,7 +2027,7 @@ impl<'a> State<'a> {
                        onceness: ast::Onceness,
                        decl: &ast::FnDecl,
                        id: Option<ast::Ident>,
-                       opt_bounds: &Option<OptVec<ast::TyParamBound>>,
+                       opt_bounds: &Option<OwnedSlice<ast::TyParamBound>>,
                        generics: Option<&ast::Generics>,
                        opt_explicit_self: Option<ast::ExplicitSelf_>)
         -> IoResult<()> {