diff options
| author | varkor <github@varkor.com> | 2018-05-16 12:57:45 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2018-06-20 12:19:04 +0100 |
| commit | f9d0968906aa6bc5ed0f82d74b5504b58afc9d3b (patch) | |
| tree | fc41e825cc102358ba1abfc29c2b3b7f5c2f2c89 /src/libsyntax/ext | |
| parent | 76c0d687453cb1da2e76a1c8e007ac080f8aa0d7 (diff) | |
| download | rust-f9d0968906aa6bc5ed0f82d74b5504b58afc9d3b.tar.gz rust-f9d0968906aa6bc5ed0f82d74b5504b58afc9d3b.zip | |
Make method and variable names more consistent
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 05a345fb2a1..c544adb5c1c 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::GenericArg>, + args: 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::GenericArg>, + args: Vec<ast::GenericArg>, bindings: Vec<ast::TypeBinding>) -> (ast::QSelf, ast::Path); @@ -302,13 +302,13 @@ pub trait AstBuilder { impl<'a> AstBuilder for ExtCtxt<'a> { fn path(&self, span: Span, strs: Vec<ast::Ident> ) -> ast::Path { - self.path_all(span, false, strs, Vec::new(), Vec::new()) + self.path_all(span, false, strs, vec![], vec![]) } fn path_ident(&self, span: Span, id: ast::Ident) -> ast::Path { self.path(span, vec![id]) } fn path_global(&self, span: Span, strs: Vec<ast::Ident> ) -> ast::Path { - self.path_all(span, true, strs, Vec::new(), Vec::new()) + self.path_all(span, true, strs, vec![], vec![]) } fn path_all(&self, span: Span, @@ -318,7 +318,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { bindings: Vec<ast::TypeBinding> ) -> ast::Path { let last_ident = idents.pop().unwrap(); - let mut segments: Vec<ast::PathSegment> = Vec::new(); + let mut segments: Vec<ast::PathSegment> = vec![]; segments.extend(idents.into_iter().map(|ident| { ast::PathSegment::from_ident(ident.with_span_pos(span)) @@ -424,7 +424,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { self.path_all(DUMMY_SP, true, self.std_path(&["option", "Option"]), - vec![ ast::GenericArg::Type(ty) ], + vec![ast::GenericArg::Type(ty)], Vec::new())) } |
