aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/extensions.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-08-23 15:01:06 +0100
committerGitHub <[email protected]>2019-08-23 15:01:06 +0100
commita832a2f7dd22c93bc69a7be5d24799bb042b8129 (patch)
tree15f55b3eab48c3d0bbb1975fbd4db7cbb56d3e3e /crates/ra_syntax/src/ast/extensions.rs
parentc12dce0073c1766f7d2b10a69f8526a8093e70dc (diff)
parent5b18a4eef9e69260ce2f105b33553c929cb7d827 (diff)
Merge #1731
1731: rename pos_field -> tuple_field r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/ast/extensions.rs')
-rw-r--r--crates/ra_syntax/src/ast/extensions.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs
index e0ea3e5ab..d3a375f87 100644
--- a/crates/ra_syntax/src/ast/extensions.rs
+++ b/crates/ra_syntax/src/ast/extensions.rs
@@ -195,16 +195,16 @@ impl ast::ImplBlock {
195 195
196#[derive(Debug, Clone, PartialEq, Eq)] 196#[derive(Debug, Clone, PartialEq, Eq)]
197pub enum StructKind { 197pub enum StructKind {
198 Tuple(ast::PosFieldDefList), 198 Tuple(ast::TupleFieldDefList),
199 Named(ast::NamedFieldDefList), 199 Named(ast::RecordFieldDefList),
200 Unit, 200 Unit,
201} 201}
202 202
203impl StructKind { 203impl StructKind {
204 fn from_node<N: AstNode>(node: &N) -> StructKind { 204 fn from_node<N: AstNode>(node: &N) -> StructKind {
205 if let Some(nfdl) = child_opt::<_, ast::NamedFieldDefList>(node) { 205 if let Some(nfdl) = child_opt::<_, ast::RecordFieldDefList>(node) {
206 StructKind::Named(nfdl) 206 StructKind::Named(nfdl)
207 } else if let Some(pfl) = child_opt::<_, ast::PosFieldDefList>(node) { 207 } else if let Some(pfl) = child_opt::<_, ast::TupleFieldDefList>(node) {
208 StructKind::Tuple(pfl) 208 StructKind::Tuple(pfl)
209 } else { 209 } else {
210 StructKind::Unit 210 StructKind::Unit