diff options
| author | Alexander Regueiro <alexreg@me.com> | 2019-02-28 22:43:53 +0000 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2019-06-05 21:09:26 +0100 |
| commit | 3816958f18ea6c8990d64d03da839e5a180b0b9b (patch) | |
| tree | 1bf9dca622038936fb05d803c5cd441b7e95885e /src/libsyntax/ext | |
| parent | dce27cba78ebda2c5adfe149d33af5a88a28d08d (diff) | |
Implemented for function bounds, type bounds, and named existential types.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 435a3d7b6a2..2a03e49996b 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -18,7 +18,7 @@ pub trait AstBuilder { global: bool, idents: Vec<ast::Ident>, args: Vec<ast::GenericArg>, - bindings: Vec<ast::TypeBinding>) + constraints: Vec<ast::AssocTyConstraint>) -> ast::Path; fn qpath(&self, self_type: P<ast::Ty>, @@ -29,7 +29,7 @@ pub trait AstBuilder { trait_path: ast::Path, ident: ast::Ident, args: Vec<ast::GenericArg>, - bindings: Vec<ast::TypeBinding>) + constraints: Vec<ast::AssocTyConstraint>) -> (ast::QSelf, ast::Path); // types and consts @@ -302,7 +302,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { global: bool, mut idents: Vec<ast::Ident> , args: Vec<ast::GenericArg>, - bindings: Vec<ast::TypeBinding> ) + constraints: Vec<ast::AssocTyConstraint> ) -> ast::Path { assert!(!idents.is_empty()); let add_root = global && !idents[0].is_path_segment_keyword(); @@ -314,8 +314,8 @@ impl<'a> AstBuilder for ExtCtxt<'a> { segments.extend(idents.into_iter().map(|ident| { ast::PathSegment::from_ident(ident.with_span_pos(span)) })); - let args = if !args.is_empty() || !bindings.is_empty() { - ast::AngleBracketedArgs { args, bindings, span }.into() + let args = if !args.is_empty() || !constraints.is_empty() { + ast::AngleBracketedArgs { args, constraints, span }.into() } else { None }; @@ -346,11 +346,11 @@ impl<'a> AstBuilder for ExtCtxt<'a> { trait_path: ast::Path, ident: ast::Ident, args: Vec<ast::GenericArg>, - bindings: Vec<ast::TypeBinding>) + constraints: Vec<ast::AssocTyConstraint>) -> (ast::QSelf, ast::Path) { let mut path = trait_path; - let args = if !args.is_empty() || !bindings.is_empty() { - ast::AngleBracketedArgs { args, bindings, span: ident.span }.into() + let args = if !args.is_empty() || !constraints.is_empty() { + ast::AngleBracketedArgs { args, constraints, span: ident.span }.into() } else { None }; |
