From b9c6aa9ec9e491160a6ad7c5ec66151bd67b0ecd Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 21:58:36 +0200 Subject: Unify naming of tuple fields --- crates/ra_syntax/src/ast/generated/nodes.rs | 8 ++++---- crates/ra_syntax/src/ast/node_ext.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_syntax/src/ast') diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 6cb637b1d..5f51c7536 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs @@ -893,7 +893,7 @@ pub struct TupleExpr { impl ast::AttrsOwner for TupleExpr {} impl TupleExpr { pub fn l_paren_token(&self) -> Option { support::token(&self.syntax, T!['(']) } - pub fn exprs(&self) -> AstChildren { support::children(&self.syntax) } + pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } pub fn r_paren_token(&self) -> Option { support::token(&self.syntax, T![')']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -1210,7 +1210,7 @@ pub struct SlicePat { } impl SlicePat { pub fn l_brack_token(&self) -> Option { support::token(&self.syntax, T!['[']) } - pub fn args(&self) -> AstChildren { support::children(&self.syntax) } + pub fn pats(&self) -> AstChildren { support::children(&self.syntax) } pub fn r_brack_token(&self) -> Option { support::token(&self.syntax, T![']']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -1219,7 +1219,7 @@ pub struct TuplePat { } impl TuplePat { pub fn l_paren_token(&self) -> Option { support::token(&self.syntax, T!['(']) } - pub fn args(&self) -> AstChildren { support::children(&self.syntax) } + pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } pub fn r_paren_token(&self) -> Option { support::token(&self.syntax, T![')']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -1229,7 +1229,7 @@ pub struct TupleStructPat { impl TupleStructPat { pub fn path(&self) -> Option { support::child(&self.syntax) } pub fn l_paren_token(&self) -> Option { support::token(&self.syntax, T!['(']) } - pub fn args(&self) -> AstChildren { support::children(&self.syntax) } + pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } pub fn r_paren_token(&self) -> Option { support::token(&self.syntax, T![')']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] diff --git a/crates/ra_syntax/src/ast/node_ext.rs b/crates/ra_syntax/src/ast/node_ext.rs index 2ffb83819..733e97877 100644 --- a/crates/ra_syntax/src/ast/node_ext.rs +++ b/crates/ra_syntax/src/ast/node_ext.rs @@ -290,7 +290,7 @@ pub struct SlicePatComponents { impl ast::SlicePat { pub fn components(&self) -> SlicePatComponents { - let mut args = self.args().peekable(); + let mut args = self.pats().peekable(); let prefix = args .peeking_take_while(|p| match p { ast::Pat::RestPat(_) => false, -- cgit v1.2.3