about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-05-28 13:33:28 +0100
committervarkor <github@varkor.com>2018-06-20 12:22:46 +0100
commitaed530a457dd937fa633dfe52cf07811196d3173 (patch)
treed7848036bf766e1153e965028d8c4c5c8ecb5940 /src/libsyntax/ext
parenta5328bc17b8d18083478554b3381d55183647f15 (diff)
Lift bounds into GenericParam
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/build.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs
index 695ad9c233f..ea151ca68a8 100644
--- a/src/libsyntax/ext/build.rs
+++ b/src/libsyntax/ext/build.rs
@@ -68,18 +68,18 @@ pub trait AstBuilder {
                span: Span,
                id: ast::Ident,
                attrs: Vec<ast::Attribute>,
-               bounds: ast::TyParamBounds,
+               bounds: ast::ParamBounds,
                default: Option<P<ast::Ty>>) -> ast::GenericParam;
 
     fn trait_ref(&self, path: ast::Path) -> ast::TraitRef;
     fn poly_trait_ref(&self, span: Span, path: ast::Path) -> ast::PolyTraitRef;
-    fn typarambound(&self, path: ast::Path) -> ast::TyParamBound;
+    fn ty_param_bound(&self, path: ast::Path) -> ast::ParamBound;
     fn lifetime(&self, span: Span, ident: ast::Ident) -> ast::Lifetime;
     fn lifetime_def(&self,
                     span: Span,
                     ident: ast::Ident,
                     attrs: Vec<ast::Attribute>,
-                    bounds: Vec<ast::Lifetime>)
+                    bounds: ast::ParamBounds)
                     -> ast::GenericParam;
 
     // statements
@@ -436,14 +436,14 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
                span: Span,
                ident: ast::Ident,
                attrs: Vec<ast::Attribute>,
-               bounds: ast::TyParamBounds,
+               bounds: ast::ParamBounds,
                default: Option<P<ast::Ty>>) -> ast::GenericParam {
         ast::GenericParam {
             ident: ident.with_span_pos(span),
             id: ast::DUMMY_NODE_ID,
             attrs: attrs.into(),
+            bounds,
             kind: ast::GenericParamKind::Type {
-                bounds,
                 default,
             }
         }
@@ -464,7 +464,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
         }
     }
 
-    fn typarambound(&self, path: ast::Path) -> ast::TyParamBound {
+    fn ty_param_bound(&self, path: ast::Path) -> ast::ParamBound {
         ast::TraitTyParamBound(self.poly_trait_ref(path.span, path), ast::TraitBoundModifier::None)
     }
 
@@ -476,16 +476,16 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
                     span: Span,
                     ident: ast::Ident,
                     attrs: Vec<ast::Attribute>,
-                    bounds: Vec<ast::Lifetime>)
+                    bounds: ast::ParamBounds)
                     -> ast::GenericParam {
         let lifetime = self.lifetime(span, ident);
         ast::GenericParam {
             ident: lifetime.ident,
             id: lifetime.id,
             attrs: attrs.into(),
+            bounds,
             kind: ast::GenericParamKind::Lifetime {
                 lifetime,
-                bounds,
             }
         }
     }