De-share ast::Ty

This commit is contained in:
James Miller
2013-07-06 16:57:11 +12:00
parent 46a1f54666
commit 47eca2113c
26 changed files with 256 additions and 255 deletions

View File

@@ -42,19 +42,19 @@ pub fn path_global(ids: ~[ident], span: span) -> ast::Path {
}
pub trait append_types {
fn add_ty(&self, ty: @ast::Ty) -> ast::Path;
fn add_tys(&self, tys: ~[@ast::Ty]) -> ast::Path;
fn add_ty(&self, ty: ast::Ty) -> ast::Path;
fn add_tys(&self, tys: ~[ast::Ty]) -> ast::Path;
}
impl append_types for ast::Path {
fn add_ty(&self, ty: @ast::Ty) -> ast::Path {
fn add_ty(&self, ty: ast::Ty) -> ast::Path {
ast::Path {
types: vec::append_one(copy self.types, ty),
.. copy *self
}
}
fn add_tys(&self, tys: ~[@ast::Ty]) -> ast::Path {
fn add_tys(&self, tys: ~[ast::Ty]) -> ast::Path {
ast::Path {
types: vec::append(copy self.types, tys),
.. copy *self