diff options
| author | bors <bors@rust-lang.org> | 2015-02-10 09:10:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-10 09:10:37 +0000 |
| commit | de8bc44753881aacdaf435f5ba61de3c20916761 (patch) | |
| tree | 31240643ba98eacb0410e7229b1f3336675a4f87 /src/libsyntax/ext | |
| parent | 29ff00cc97e67ed6aec16aa6c30e152d6065e952 (diff) | |
| parent | f9c577e5141dda6413efcfd036389d7d2480e528 (diff) | |
| download | rust-de8bc44753881aacdaf435f5ba61de3c20916761.tar.gz rust-de8bc44753881aacdaf435f5ba61de3c20916761.zip | |
Auto merge of #21961 - nick29581:hrl-syntax, r=nmatsakis
Closes # 20022 r? @nikomatsakis
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 9 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/generic/mod.rs | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index a7d1baf08be..6d9a2fdb9f1 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -70,7 +70,7 @@ pub trait AstBuilder { default: Option<P<ast::Ty>>) -> ast::TyParam; fn trait_ref(&self, path: ast::Path) -> ast::TraitRef; - fn poly_trait_ref(&self, path: ast::Path) -> ast::PolyTraitRef; + fn poly_trait_ref(&self, span: Span, path: ast::Path) -> ast::PolyTraitRef; fn typarambound(&self, path: ast::Path) -> ast::TyParamBound; fn lifetime(&self, span: Span, ident: ast::Name) -> ast::Lifetime; fn lifetime_def(&self, @@ -442,15 +442,16 @@ impl<'a> AstBuilder for ExtCtxt<'a> { } } - fn poly_trait_ref(&self, path: ast::Path) -> ast::PolyTraitRef { + fn poly_trait_ref(&self, span: Span, path: ast::Path) -> ast::PolyTraitRef { ast::PolyTraitRef { bound_lifetimes: Vec::new(), - trait_ref: self.trait_ref(path) + trait_ref: self.trait_ref(path), + span: span, } } fn typarambound(&self, path: ast::Path) -> ast::TyParamBound { - ast::TraitTyParamBound(self.poly_trait_ref(path), ast::TraitBoundModifier::None) + ast::TraitTyParamBound(self.poly_trait_ref(path.span, path), ast::TraitBoundModifier::None) } fn lifetime(&self, span: Span, name: ast::Name) -> ast::Lifetime { diff --git a/src/libsyntax/ext/deriving/generic/mod.rs b/src/libsyntax/ext/deriving/generic/mod.rs index 28573ef757b..d9242417e04 100644 --- a/src/libsyntax/ext/deriving/generic/mod.rs +++ b/src/libsyntax/ext/deriving/generic/mod.rs @@ -443,6 +443,7 @@ impl<'a> TraitDef<'a> { ast::WherePredicate::BoundPredicate(ref wb) => { ast::WherePredicate::BoundPredicate(ast::WhereBoundPredicate { span: self.span, + bound_lifetimes: wb.bound_lifetimes.clone(), bounded_ty: wb.bounded_ty.clone(), bounds: OwnedSlice::from_vec(wb.bounds.iter().map(|b| b.clone()).collect()) }) |
