diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-12-18 13:43:46 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-12-18 20:02:12 +0530 |
| commit | 9e953df6f05765679db074b8895ed2178d75eb26 (patch) | |
| tree | e71174db4adcf4adf1709afb41ff3fc125d5c35b /src/libsyntax_ext | |
| parent | 158a1bdd7dac47356a0cc44dd52308c7145f4afe (diff) | |
| parent | 6c87b191580be9ecd5a99a34ef97375af0b9d659 (diff) | |
| download | rust-9e953df6f05765679db074b8895ed2178d75eb26.tar.gz rust-9e953df6f05765679db074b8895ed2178d75eb26.zip | |
Rollup merge of #30420 - petrochenkov:owned2, r=nrc
Part of https://github.com/rust-lang/rust/pull/30095 not causing mysterious segfaults. r? @nrc
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/deriving/generic/mod.rs | 9 | ||||
| -rw-r--r-- | src/libsyntax_ext/deriving/generic/ty.rs | 3 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs index b76384ffb4a..8f316649421 100644 --- a/src/libsyntax_ext/deriving/generic/mod.rs +++ b/src/libsyntax_ext/deriving/generic/mod.rs @@ -205,7 +205,6 @@ use syntax::codemap::{self, DUMMY_SP}; use syntax::codemap::Span; use syntax::errors::Handler; use syntax::util::move_map::MoveMap; -use syntax::owned_slice::OwnedSlice; use syntax::parse::token::{intern, InternedString}; use syntax::parse::token::special_idents; use syntax::ptr::P; @@ -516,7 +515,7 @@ impl<'a> TraitDef<'a> { cx.typaram(self.span, ty_param.ident, - OwnedSlice::from_vec(bounds), + P::from_vec(bounds), None) })); @@ -528,7 +527,7 @@ impl<'a> TraitDef<'a> { span: self.span, bound_lifetimes: wb.bound_lifetimes.clone(), bounded_ty: wb.bounded_ty.clone(), - bounds: OwnedSlice::from_vec(wb.bounds.iter().cloned().collect()) + bounds: P::from_vec(wb.bounds.iter().cloned().collect()) }) } ast::WherePredicate::RegionPredicate(ref rb) => { @@ -579,7 +578,7 @@ impl<'a> TraitDef<'a> { span: self.span, bound_lifetimes: vec![], bounded_ty: ty, - bounds: OwnedSlice::from_vec(bounds), + bounds: P::from_vec(bounds), }; let predicate = ast::WherePredicate::BoundPredicate(predicate); @@ -590,7 +589,7 @@ impl<'a> TraitDef<'a> { let trait_generics = Generics { lifetimes: lifetimes, - ty_params: OwnedSlice::from_vec(ty_params), + ty_params: P::from_vec(ty_params), where_clause: where_clause }; diff --git a/src/libsyntax_ext/deriving/generic/ty.rs b/src/libsyntax_ext/deriving/generic/ty.rs index 0c4a81361ae..10564b5f698 100644 --- a/src/libsyntax_ext/deriving/generic/ty.rs +++ b/src/libsyntax_ext/deriving/generic/ty.rs @@ -19,7 +19,6 @@ use syntax::ast::{Expr,Generics,Ident}; use syntax::ext::base::ExtCtxt; use syntax::ext::build::AstBuilder; use syntax::codemap::{Span,respan}; -use syntax::owned_slice::OwnedSlice; use syntax::parse::token::special_idents; use syntax::ptr::P; @@ -209,7 +208,7 @@ fn mk_generics(lifetimes: Vec<ast::LifetimeDef>, ty_params: Vec<ast::TyParam>) -> Generics { Generics { lifetimes: lifetimes, - ty_params: OwnedSlice::from_vec(ty_params), + ty_params: P::from_vec(ty_params), where_clause: ast::WhereClause { id: ast::DUMMY_NODE_ID, predicates: Vec::new(), |
