diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-09-30 17:43:40 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-10-01 19:22:39 +0530 |
| commit | 406fe7e3c2cf3e339763aea2a263559b8a8e6d87 (patch) | |
| tree | 1687c31700872c8587edfee7bd50510e17a75e7f /src/libsyntax/ext | |
| parent | 259d1fcd478f868a9980cdce63f7556f30d55b90 (diff) | |
| parent | 3a9b7be10b8e32d014008f9fde276cd032aa4e4a (diff) | |
| download | rust-406fe7e3c2cf3e339763aea2a263559b8a8e6d87.tar.gz rust-406fe7e3c2cf3e339763aea2a263559b8a8e6d87.zip | |
Rollup merge of #34764 - pnkfelix:attrs-on-generic-formals, r=eddyb
First step for #34761
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 08bedd794f6..bdbc45471bb 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -73,6 +73,7 @@ pub trait AstBuilder { fn typaram(&self, span: Span, id: ast::Ident, + attrs: Vec<ast::Attribute>, bounds: ast::TyParamBounds, default: Option<P<ast::Ty>>) -> ast::TyParam; @@ -83,6 +84,7 @@ pub trait AstBuilder { fn lifetime_def(&self, span: Span, name: ast::Name, + attrs: Vec<ast::Attribute>, bounds: Vec<ast::Lifetime>) -> ast::LifetimeDef; @@ -452,11 +454,13 @@ impl<'a> AstBuilder for ExtCtxt<'a> { fn typaram(&self, span: Span, id: ast::Ident, + attrs: Vec<ast::Attribute>, bounds: ast::TyParamBounds, default: Option<P<ast::Ty>>) -> ast::TyParam { ast::TyParam { ident: id, id: ast::DUMMY_NODE_ID, + attrs: attrs.into(), bounds: bounds, default: default, span: span @@ -503,9 +507,11 @@ impl<'a> AstBuilder for ExtCtxt<'a> { fn lifetime_def(&self, span: Span, name: ast::Name, + attrs: Vec<ast::Attribute>, bounds: Vec<ast::Lifetime>) -> ast::LifetimeDef { ast::LifetimeDef { + attrs: attrs.into(), lifetime: self.lifetime(span, name), bounds: bounds } |
