diff options
| author | varkor <github@varkor.com> | 2018-02-23 17:48:54 +0000 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2018-06-20 12:19:04 +0100 |
| commit | 76c0d687453cb1da2e76a1c8e007ac080f8aa0d7 (patch) | |
| tree | 3808eb6cc3f7fd9128488f3fca580e50f6702ff3 /src/libsyntax/ext | |
| parent | 3e89753283a3d08704ab293b337d255e5d5e5210 (diff) | |
| download | rust-76c0d687453cb1da2e76a1c8e007ac080f8aa0d7.tar.gz rust-76c0d687453cb1da2e76a1c8e007ac080f8aa0d7.zip | |
Rename "parameter" to "arg"
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index a59e34580c0..05a345fb2a1 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -31,7 +31,7 @@ pub trait AstBuilder { fn path_all(&self, sp: Span, global: bool, idents: Vec<ast::Ident>, - parameters: Vec<ast::AngleBracketedParam>, + parameters: Vec<ast::GenericArg>, bindings: Vec<ast::TypeBinding>) -> ast::Path; @@ -42,7 +42,7 @@ pub trait AstBuilder { fn qpath_all(&self, self_type: P<ast::Ty>, trait_path: ast::Path, ident: ast::Ident, - parameters: Vec<ast::AngleBracketedParam>, + parameters: Vec<ast::GenericArg>, bindings: Vec<ast::TypeBinding>) -> (ast::QSelf, ast::Path); @@ -314,7 +314,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { span: Span, global: bool, mut idents: Vec<ast::Ident> , - parameters: Vec<ast::AngleBracketedParam>, + args: Vec<ast::GenericArg>, bindings: Vec<ast::TypeBinding> ) -> ast::Path { let last_ident = idents.pop().unwrap(); @@ -323,12 +323,12 @@ impl<'a> AstBuilder for ExtCtxt<'a> { segments.extend(idents.into_iter().map(|ident| { ast::PathSegment::from_ident(ident.with_span_pos(span)) })); - let parameters = if !parameters.is_empty() !bindings.is_empty() { - ast::AngleBracketedParameterData { parameters, bindings, span }.into() + let args = if !args.is_empty() || !bindings.is_empty() { + ast::AngleBracketedArgs { args, bindings, span }.into() } else { None }; - segments.push(ast::PathSegment { ident: last_ident.with_span_pos(span), parameters }); + segments.push(ast::PathSegment { ident: last_ident.with_span_pos(span), args }); let mut path = ast::Path { span, segments }; if global { if let Some(seg) = path.make_root() { @@ -356,16 +356,16 @@ impl<'a> AstBuilder for ExtCtxt<'a> { self_type: P<ast::Ty>, trait_path: ast::Path, ident: ast::Ident, - parameters: Vec<ast::AngleBracketedParam>, + args: Vec<ast::GenericArg>, bindings: Vec<ast::TypeBinding>) -> (ast::QSelf, ast::Path) { let mut path = trait_path; - let parameters = if !parameters.is_empty() || !bindings.is_empty() { - ast::AngleBracketedParameterData { parameters, bindings, span: ident.span }.into() + let args = if !args.is_empty() || !bindings.is_empty() { + ast::AngleBracketedArgs { args, bindings, span: ident.span }.into() } else { None }; - path.segments.push(ast::PathSegment { ident, parameters }); + path.segments.push(ast::PathSegment { ident, args }); (ast::QSelf { ty: self_type, @@ -424,7 +424,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { self.path_all(DUMMY_SP, true, self.std_path(&["option", "Option"]), - vec![ ast::AngleBracketedParam::Type(ty) ], + vec![ ast::GenericArg::Type(ty) ], Vec::new())) } |
