aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
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
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')
-rw-r--r--crates/ra_syntax/src/ast/expr_extensions.rs6
-rw-r--r--crates/ra_syntax/src/ast/extensions.rs8
-rw-r--r--crates/ra_syntax/src/ast/generated.rs522
-rw-r--r--crates/ra_syntax/src/grammar.ron48
-rw-r--r--crates/ra_syntax/src/parsing/text_tree_sink.rs2
-rw-r--r--crates/ra_syntax/src/ptr.rs2
-rw-r--r--crates/ra_syntax/src/validation.rs2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt6
-rw-r--r--crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt6
-rw-r--r--crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt8
-rw-r--r--crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt6
-rw-r--r--crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt8
-rw-r--r--crates/ra_syntax/test_data/parser/err/0025_nope.txt16
-rw-r--r--crates/ra_syntax/test_data/parser/fuzz-failures/0000.rs4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.txt4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.txt8
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0054_field_attrs.rs)0
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.txt (renamed from crates/ra_syntax/test_data/parser/inline/ok/0054_field_attrs.txt)4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0061_struct_lit.rs)0
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.txt (renamed from crates/ra_syntax/test_data/parser/inline/ok/0061_struct_lit.txt)26
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.txt6
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.txt8
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.txt16
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0102_field_pat_list.rs)0
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.txt (renamed from crates/ra_syntax/test_data/parser/inline/ok/0102_field_pat_list.txt)20
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.txt8
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0115_pos_field_attrs.rs)0
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.txt (renamed from crates/ra_syntax/test_data/parser/inline/ok/0115_pos_field_attrs.txt)4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0125_struct_literal_field_with_attr.rs)0
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.txt (renamed from crates/ra_syntax/test_data/parser/inline/ok/0125_struct_literal_field_with_attr.txt)6
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.txt2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.txt6
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0001_struct_item.txt4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.txt4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0008_mod_item.txt2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.txt16
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.txt8
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0019_enums.txt14
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.txt4
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.txt16
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.txt6
43 files changed, 421 insertions, 421 deletions
diff --git a/crates/ra_syntax/src/ast/expr_extensions.rs b/crates/ra_syntax/src/ast/expr_extensions.rs
index cf5b6f251..d7ea4354d 100644
--- a/crates/ra_syntax/src/ast/expr_extensions.rs
+++ b/crates/ra_syntax/src/ast/expr_extensions.rs
@@ -296,8 +296,8 @@ fn test_literal_with_attr() {
296 assert_eq!(lit.token().text(), r#""Hello""#); 296 assert_eq!(lit.token().text(), r#""Hello""#);
297} 297}
298 298
299impl ast::NamedField { 299impl ast::RecordField {
300 pub fn parent_struct_lit(&self) -> ast::StructLit { 300 pub fn parent_record_lit(&self) -> ast::RecordLit {
301 self.syntax().ancestors().find_map(ast::StructLit::cast).unwrap() 301 self.syntax().ancestors().find_map(ast::RecordLit::cast).unwrap()
302 } 302 }
303} 303}
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
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs
index 9c5789701..07cc3e0db 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -607,7 +607,7 @@ pub enum Expr {
607 BlockExpr(BlockExpr), 607 BlockExpr(BlockExpr),
608 ReturnExpr(ReturnExpr), 608 ReturnExpr(ReturnExpr),
609 MatchExpr(MatchExpr), 609 MatchExpr(MatchExpr),
610 StructLit(StructLit), 610 RecordLit(RecordLit),
611 CallExpr(CallExpr), 611 CallExpr(CallExpr),
612 IndexExpr(IndexExpr), 612 IndexExpr(IndexExpr),
613 MethodCallExpr(MethodCallExpr), 613 MethodCallExpr(MethodCallExpr),
@@ -698,9 +698,9 @@ impl From<MatchExpr> for Expr {
698 Expr::MatchExpr(node) 698 Expr::MatchExpr(node)
699 } 699 }
700} 700}
701impl From<StructLit> for Expr { 701impl From<RecordLit> for Expr {
702 fn from(node: StructLit) -> Expr { 702 fn from(node: RecordLit) -> Expr {
703 Expr::StructLit(node) 703 Expr::RecordLit(node)
704 } 704 }
705} 705}
706impl From<CallExpr> for Expr { 706impl From<CallExpr> for Expr {
@@ -778,7 +778,7 @@ impl AstNode for Expr {
778 match kind { 778 match kind {
779 TUPLE_EXPR | ARRAY_EXPR | PAREN_EXPR | PATH_EXPR | LAMBDA_EXPR | IF_EXPR 779 TUPLE_EXPR | ARRAY_EXPR | PAREN_EXPR | PATH_EXPR | LAMBDA_EXPR | IF_EXPR
780 | LOOP_EXPR | FOR_EXPR | WHILE_EXPR | CONTINUE_EXPR | BREAK_EXPR | LABEL 780 | LOOP_EXPR | FOR_EXPR | WHILE_EXPR | CONTINUE_EXPR | BREAK_EXPR | LABEL
781 | BLOCK_EXPR | RETURN_EXPR | MATCH_EXPR | STRUCT_LIT | CALL_EXPR | INDEX_EXPR 781 | BLOCK_EXPR | RETURN_EXPR | MATCH_EXPR | RECORD_LIT | CALL_EXPR | INDEX_EXPR
782 | METHOD_CALL_EXPR | FIELD_EXPR | AWAIT_EXPR | TRY_EXPR | TRY_BLOCK_EXPR 782 | METHOD_CALL_EXPR | FIELD_EXPR | AWAIT_EXPR | TRY_EXPR | TRY_BLOCK_EXPR
783 | CAST_EXPR | REF_EXPR | PREFIX_EXPR | RANGE_EXPR | BIN_EXPR | LITERAL | MACRO_CALL => { 783 | CAST_EXPR | REF_EXPR | PREFIX_EXPR | RANGE_EXPR | BIN_EXPR | LITERAL | MACRO_CALL => {
784 true 784 true
@@ -803,7 +803,7 @@ impl AstNode for Expr {
803 BLOCK_EXPR => Expr::BlockExpr(BlockExpr { syntax }), 803 BLOCK_EXPR => Expr::BlockExpr(BlockExpr { syntax }),
804 RETURN_EXPR => Expr::ReturnExpr(ReturnExpr { syntax }), 804 RETURN_EXPR => Expr::ReturnExpr(ReturnExpr { syntax }),
805 MATCH_EXPR => Expr::MatchExpr(MatchExpr { syntax }), 805 MATCH_EXPR => Expr::MatchExpr(MatchExpr { syntax }),
806 STRUCT_LIT => Expr::StructLit(StructLit { syntax }), 806 RECORD_LIT => Expr::RecordLit(RecordLit { syntax }),
807 CALL_EXPR => Expr::CallExpr(CallExpr { syntax }), 807 CALL_EXPR => Expr::CallExpr(CallExpr { syntax }),
808 INDEX_EXPR => Expr::IndexExpr(IndexExpr { syntax }), 808 INDEX_EXPR => Expr::IndexExpr(IndexExpr { syntax }),
809 METHOD_CALL_EXPR => Expr::MethodCallExpr(MethodCallExpr { syntax }), 809 METHOD_CALL_EXPR => Expr::MethodCallExpr(MethodCallExpr { syntax }),
@@ -839,7 +839,7 @@ impl AstNode for Expr {
839 Expr::BlockExpr(it) => &it.syntax, 839 Expr::BlockExpr(it) => &it.syntax,
840 Expr::ReturnExpr(it) => &it.syntax, 840 Expr::ReturnExpr(it) => &it.syntax,
841 Expr::MatchExpr(it) => &it.syntax, 841 Expr::MatchExpr(it) => &it.syntax,
842 Expr::StructLit(it) => &it.syntax, 842 Expr::RecordLit(it) => &it.syntax,
843 Expr::CallExpr(it) => &it.syntax, 843 Expr::CallExpr(it) => &it.syntax,
844 Expr::IndexExpr(it) => &it.syntax, 844 Expr::IndexExpr(it) => &it.syntax,
845 Expr::MethodCallExpr(it) => &it.syntax, 845 Expr::MethodCallExpr(it) => &it.syntax,
@@ -946,64 +946,6 @@ impl FieldExpr {
946 } 946 }
947} 947}
948#[derive(Debug, Clone, PartialEq, Eq, Hash)] 948#[derive(Debug, Clone, PartialEq, Eq, Hash)]
949pub struct FieldPat {
950 pub(crate) syntax: SyntaxNode,
951}
952impl AstNode for FieldPat {
953 fn can_cast(kind: SyntaxKind) -> bool {
954 match kind {
955 FIELD_PAT => true,
956 _ => false,
957 }
958 }
959 fn cast(syntax: SyntaxNode) -> Option<Self> {
960 if Self::can_cast(syntax.kind()) {
961 Some(Self { syntax })
962 } else {
963 None
964 }
965 }
966 fn syntax(&self) -> &SyntaxNode {
967 &self.syntax
968 }
969}
970impl ast::NameOwner for FieldPat {}
971impl FieldPat {
972 pub fn pat(&self) -> Option<Pat> {
973 AstChildren::new(&self.syntax).next()
974 }
975}
976#[derive(Debug, Clone, PartialEq, Eq, Hash)]
977pub struct FieldPatList {
978 pub(crate) syntax: SyntaxNode,
979}
980impl AstNode for FieldPatList {
981 fn can_cast(kind: SyntaxKind) -> bool {
982 match kind {
983 FIELD_PAT_LIST => true,
984 _ => false,
985 }
986 }
987 fn cast(syntax: SyntaxNode) -> Option<Self> {
988 if Self::can_cast(syntax.kind()) {
989 Some(Self { syntax })
990 } else {
991 None
992 }
993 }
994 fn syntax(&self) -> &SyntaxNode {
995 &self.syntax
996 }
997}
998impl FieldPatList {
999 pub fn field_pats(&self) -> AstChildren<FieldPat> {
1000 AstChildren::new(&self.syntax)
1001 }
1002 pub fn bind_pats(&self) -> AstChildren<BindPat> {
1003 AstChildren::new(&self.syntax)
1004 }
1005}
1006#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1007pub struct FnDef { 949pub struct FnDef {
1008 pub(crate) syntax: SyntaxNode, 950 pub(crate) syntax: SyntaxNode,
1009} 951}
@@ -1942,121 +1884,6 @@ impl AstNode for NameRef {
1942} 1884}
1943impl NameRef {} 1885impl NameRef {}
1944#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1886#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1945pub struct NamedField {
1946 pub(crate) syntax: SyntaxNode,
1947}
1948impl AstNode for NamedField {
1949 fn can_cast(kind: SyntaxKind) -> bool {
1950 match kind {
1951 NAMED_FIELD => true,
1952 _ => false,
1953 }
1954 }
1955 fn cast(syntax: SyntaxNode) -> Option<Self> {
1956 if Self::can_cast(syntax.kind()) {
1957 Some(Self { syntax })
1958 } else {
1959 None
1960 }
1961 }
1962 fn syntax(&self) -> &SyntaxNode {
1963 &self.syntax
1964 }
1965}
1966impl NamedField {
1967 pub fn name_ref(&self) -> Option<NameRef> {
1968 AstChildren::new(&self.syntax).next()
1969 }
1970 pub fn expr(&self) -> Option<Expr> {
1971 AstChildren::new(&self.syntax).next()
1972 }
1973}
1974#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1975pub struct NamedFieldDef {
1976 pub(crate) syntax: SyntaxNode,
1977}
1978impl AstNode for NamedFieldDef {
1979 fn can_cast(kind: SyntaxKind) -> bool {
1980 match kind {
1981 NAMED_FIELD_DEF => true,
1982 _ => false,
1983 }
1984 }
1985 fn cast(syntax: SyntaxNode) -> Option<Self> {
1986 if Self::can_cast(syntax.kind()) {
1987 Some(Self { syntax })
1988 } else {
1989 None
1990 }
1991 }
1992 fn syntax(&self) -> &SyntaxNode {
1993 &self.syntax
1994 }
1995}
1996impl ast::VisibilityOwner for NamedFieldDef {}
1997impl ast::NameOwner for NamedFieldDef {}
1998impl ast::AttrsOwner for NamedFieldDef {}
1999impl ast::DocCommentsOwner for NamedFieldDef {}
2000impl ast::TypeAscriptionOwner for NamedFieldDef {}
2001impl NamedFieldDef {}
2002#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2003pub struct NamedFieldDefList {
2004 pub(crate) syntax: SyntaxNode,
2005}
2006impl AstNode for NamedFieldDefList {
2007 fn can_cast(kind: SyntaxKind) -> bool {
2008 match kind {
2009 NAMED_FIELD_DEF_LIST => true,
2010 _ => false,
2011 }
2012 }
2013 fn cast(syntax: SyntaxNode) -> Option<Self> {
2014 if Self::can_cast(syntax.kind()) {
2015 Some(Self { syntax })
2016 } else {
2017 None
2018 }
2019 }
2020 fn syntax(&self) -> &SyntaxNode {
2021 &self.syntax
2022 }
2023}
2024impl NamedFieldDefList {
2025 pub fn fields(&self) -> AstChildren<NamedFieldDef> {
2026 AstChildren::new(&self.syntax)
2027 }
2028}
2029#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2030pub struct NamedFieldList {
2031 pub(crate) syntax: SyntaxNode,
2032}
2033impl AstNode for NamedFieldList {
2034 fn can_cast(kind: SyntaxKind) -> bool {
2035 match kind {
2036 NAMED_FIELD_LIST => true,
2037 _ => false,
2038 }
2039 }
2040 fn cast(syntax: SyntaxNode) -> Option<Self> {
2041 if Self::can_cast(syntax.kind()) {
2042 Some(Self { syntax })
2043 } else {
2044 None
2045 }
2046 }
2047 fn syntax(&self) -> &SyntaxNode {
2048 &self.syntax
2049 }
2050}
2051impl NamedFieldList {
2052 pub fn fields(&self) -> AstChildren<NamedField> {
2053 AstChildren::new(&self.syntax)
2054 }
2055 pub fn spread(&self) -> Option<Expr> {
2056 AstChildren::new(&self.syntax).next()
2057 }
2058}
2059#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2060pub struct NeverType { 1887pub struct NeverType {
2061 pub(crate) syntax: SyntaxNode, 1888 pub(crate) syntax: SyntaxNode,
2062} 1889}
@@ -2239,7 +2066,7 @@ pub enum Pat {
2239 BindPat(BindPat), 2066 BindPat(BindPat),
2240 PlaceholderPat(PlaceholderPat), 2067 PlaceholderPat(PlaceholderPat),
2241 PathPat(PathPat), 2068 PathPat(PathPat),
2242 StructPat(StructPat), 2069 RecordPat(RecordPat),
2243 TupleStructPat(TupleStructPat), 2070 TupleStructPat(TupleStructPat),
2244 TuplePat(TuplePat), 2071 TuplePat(TuplePat),
2245 SlicePat(SlicePat), 2072 SlicePat(SlicePat),
@@ -2266,9 +2093,9 @@ impl From<PathPat> for Pat {
2266 Pat::PathPat(node) 2093 Pat::PathPat(node)
2267 } 2094 }
2268} 2095}
2269impl From<StructPat> for Pat { 2096impl From<RecordPat> for Pat {
2270 fn from(node: StructPat) -> Pat { 2097 fn from(node: RecordPat) -> Pat {
2271 Pat::StructPat(node) 2098 Pat::RecordPat(node)
2272 } 2099 }
2273} 2100}
2274impl From<TupleStructPat> for Pat { 2101impl From<TupleStructPat> for Pat {
@@ -2299,7 +2126,7 @@ impl From<LiteralPat> for Pat {
2299impl AstNode for Pat { 2126impl AstNode for Pat {
2300 fn can_cast(kind: SyntaxKind) -> bool { 2127 fn can_cast(kind: SyntaxKind) -> bool {
2301 match kind { 2128 match kind {
2302 REF_PAT | BIND_PAT | PLACEHOLDER_PAT | PATH_PAT | STRUCT_PAT | TUPLE_STRUCT_PAT 2129 REF_PAT | BIND_PAT | PLACEHOLDER_PAT | PATH_PAT | RECORD_PAT | TUPLE_STRUCT_PAT
2303 | TUPLE_PAT | SLICE_PAT | RANGE_PAT | LITERAL_PAT => true, 2130 | TUPLE_PAT | SLICE_PAT | RANGE_PAT | LITERAL_PAT => true,
2304 _ => false, 2131 _ => false,
2305 } 2132 }
@@ -2310,7 +2137,7 @@ impl AstNode for Pat {
2310 BIND_PAT => Pat::BindPat(BindPat { syntax }), 2137 BIND_PAT => Pat::BindPat(BindPat { syntax }),
2311 PLACEHOLDER_PAT => Pat::PlaceholderPat(PlaceholderPat { syntax }), 2138 PLACEHOLDER_PAT => Pat::PlaceholderPat(PlaceholderPat { syntax }),
2312 PATH_PAT => Pat::PathPat(PathPat { syntax }), 2139 PATH_PAT => Pat::PathPat(PathPat { syntax }),
2313 STRUCT_PAT => Pat::StructPat(StructPat { syntax }), 2140 RECORD_PAT => Pat::RecordPat(RecordPat { syntax }),
2314 TUPLE_STRUCT_PAT => Pat::TupleStructPat(TupleStructPat { syntax }), 2141 TUPLE_STRUCT_PAT => Pat::TupleStructPat(TupleStructPat { syntax }),
2315 TUPLE_PAT => Pat::TuplePat(TuplePat { syntax }), 2142 TUPLE_PAT => Pat::TuplePat(TuplePat { syntax }),
2316 SLICE_PAT => Pat::SlicePat(SlicePat { syntax }), 2143 SLICE_PAT => Pat::SlicePat(SlicePat { syntax }),
@@ -2326,7 +2153,7 @@ impl AstNode for Pat {
2326 Pat::BindPat(it) => &it.syntax, 2153 Pat::BindPat(it) => &it.syntax,
2327 Pat::PlaceholderPat(it) => &it.syntax, 2154 Pat::PlaceholderPat(it) => &it.syntax,
2328 Pat::PathPat(it) => &it.syntax, 2155 Pat::PathPat(it) => &it.syntax,
2329 Pat::StructPat(it) => &it.syntax, 2156 Pat::RecordPat(it) => &it.syntax,
2330 Pat::TupleStructPat(it) => &it.syntax, 2157 Pat::TupleStructPat(it) => &it.syntax,
2331 Pat::TuplePat(it) => &it.syntax, 2158 Pat::TuplePat(it) => &it.syntax,
2332 Pat::SlicePat(it) => &it.syntax, 2159 Pat::SlicePat(it) => &it.syntax,
@@ -2551,13 +2378,13 @@ impl PointerType {
2551 } 2378 }
2552} 2379}
2553#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2380#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2554pub struct PosFieldDef { 2381pub struct PrefixExpr {
2555 pub(crate) syntax: SyntaxNode, 2382 pub(crate) syntax: SyntaxNode,
2556} 2383}
2557impl AstNode for PosFieldDef { 2384impl AstNode for PrefixExpr {
2558 fn can_cast(kind: SyntaxKind) -> bool { 2385 fn can_cast(kind: SyntaxKind) -> bool {
2559 match kind { 2386 match kind {
2560 POS_FIELD_DEF => true, 2387 PREFIX_EXPR => true,
2561 _ => false, 2388 _ => false,
2562 } 2389 }
2563 } 2390 }
@@ -2572,21 +2399,19 @@ impl AstNode for PosFieldDef {
2572 &self.syntax 2399 &self.syntax
2573 } 2400 }
2574} 2401}
2575impl ast::VisibilityOwner for PosFieldDef {} 2402impl PrefixExpr {
2576impl ast::AttrsOwner for PosFieldDef {} 2403 pub fn expr(&self) -> Option<Expr> {
2577impl PosFieldDef {
2578 pub fn type_ref(&self) -> Option<TypeRef> {
2579 AstChildren::new(&self.syntax).next() 2404 AstChildren::new(&self.syntax).next()
2580 } 2405 }
2581} 2406}
2582#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2407#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2583pub struct PosFieldDefList { 2408pub struct RangeExpr {
2584 pub(crate) syntax: SyntaxNode, 2409 pub(crate) syntax: SyntaxNode,
2585} 2410}
2586impl AstNode for PosFieldDefList { 2411impl AstNode for RangeExpr {
2587 fn can_cast(kind: SyntaxKind) -> bool { 2412 fn can_cast(kind: SyntaxKind) -> bool {
2588 match kind { 2413 match kind {
2589 POS_FIELD_DEF_LIST => true, 2414 RANGE_EXPR => true,
2590 _ => false, 2415 _ => false,
2591 } 2416 }
2592 } 2417 }
@@ -2601,19 +2426,38 @@ impl AstNode for PosFieldDefList {
2601 &self.syntax 2426 &self.syntax
2602 } 2427 }
2603} 2428}
2604impl PosFieldDefList { 2429impl RangeExpr {}
2605 pub fn fields(&self) -> AstChildren<PosFieldDef> { 2430#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2606 AstChildren::new(&self.syntax) 2431pub struct RangePat {
2432 pub(crate) syntax: SyntaxNode,
2433}
2434impl AstNode for RangePat {
2435 fn can_cast(kind: SyntaxKind) -> bool {
2436 match kind {
2437 RANGE_PAT => true,
2438 _ => false,
2439 }
2440 }
2441 fn cast(syntax: SyntaxNode) -> Option<Self> {
2442 if Self::can_cast(syntax.kind()) {
2443 Some(Self { syntax })
2444 } else {
2445 None
2446 }
2447 }
2448 fn syntax(&self) -> &SyntaxNode {
2449 &self.syntax
2607 } 2450 }
2608} 2451}
2452impl RangePat {}
2609#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2453#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2610pub struct PrefixExpr { 2454pub struct RecordField {
2611 pub(crate) syntax: SyntaxNode, 2455 pub(crate) syntax: SyntaxNode,
2612} 2456}
2613impl AstNode for PrefixExpr { 2457impl AstNode for RecordField {
2614 fn can_cast(kind: SyntaxKind) -> bool { 2458 fn can_cast(kind: SyntaxKind) -> bool {
2615 match kind { 2459 match kind {
2616 PREFIX_EXPR => true, 2460 RECORD_FIELD => true,
2617 _ => false, 2461 _ => false,
2618 } 2462 }
2619 } 2463 }
@@ -2628,19 +2472,22 @@ impl AstNode for PrefixExpr {
2628 &self.syntax 2472 &self.syntax
2629 } 2473 }
2630} 2474}
2631impl PrefixExpr { 2475impl RecordField {
2476 pub fn name_ref(&self) -> Option<NameRef> {
2477 AstChildren::new(&self.syntax).next()
2478 }
2632 pub fn expr(&self) -> Option<Expr> { 2479 pub fn expr(&self) -> Option<Expr> {
2633 AstChildren::new(&self.syntax).next() 2480 AstChildren::new(&self.syntax).next()
2634 } 2481 }
2635} 2482}
2636#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2483#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2637pub struct RangeExpr { 2484pub struct RecordFieldDef {
2638 pub(crate) syntax: SyntaxNode, 2485 pub(crate) syntax: SyntaxNode,
2639} 2486}
2640impl AstNode for RangeExpr { 2487impl AstNode for RecordFieldDef {
2641 fn can_cast(kind: SyntaxKind) -> bool { 2488 fn can_cast(kind: SyntaxKind) -> bool {
2642 match kind { 2489 match kind {
2643 RANGE_EXPR => true, 2490 RECORD_FIELD_DEF => true,
2644 _ => false, 2491 _ => false,
2645 } 2492 }
2646 } 2493 }
@@ -2655,15 +2502,20 @@ impl AstNode for RangeExpr {
2655 &self.syntax 2502 &self.syntax
2656 } 2503 }
2657} 2504}
2658impl RangeExpr {} 2505impl ast::VisibilityOwner for RecordFieldDef {}
2506impl ast::NameOwner for RecordFieldDef {}
2507impl ast::AttrsOwner for RecordFieldDef {}
2508impl ast::DocCommentsOwner for RecordFieldDef {}
2509impl ast::TypeAscriptionOwner for RecordFieldDef {}
2510impl RecordFieldDef {}
2659#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2511#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2660pub struct RangePat { 2512pub struct RecordFieldDefList {
2661 pub(crate) syntax: SyntaxNode, 2513 pub(crate) syntax: SyntaxNode,
2662} 2514}
2663impl AstNode for RangePat { 2515impl AstNode for RecordFieldDefList {
2664 fn can_cast(kind: SyntaxKind) -> bool { 2516 fn can_cast(kind: SyntaxKind) -> bool {
2665 match kind { 2517 match kind {
2666 RANGE_PAT => true, 2518 RECORD_FIELD_DEF_LIST => true,
2667 _ => false, 2519 _ => false,
2668 } 2520 }
2669 } 2521 }
@@ -2678,7 +2530,159 @@ impl AstNode for RangePat {
2678 &self.syntax 2530 &self.syntax
2679 } 2531 }
2680} 2532}
2681impl RangePat {} 2533impl RecordFieldDefList {
2534 pub fn fields(&self) -> AstChildren<RecordFieldDef> {
2535 AstChildren::new(&self.syntax)
2536 }
2537}
2538#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2539pub struct RecordFieldList {
2540 pub(crate) syntax: SyntaxNode,
2541}
2542impl AstNode for RecordFieldList {
2543 fn can_cast(kind: SyntaxKind) -> bool {
2544 match kind {
2545 RECORD_FIELD_LIST => true,
2546 _ => false,
2547 }
2548 }
2549 fn cast(syntax: SyntaxNode) -> Option<Self> {
2550 if Self::can_cast(syntax.kind()) {
2551 Some(Self { syntax })
2552 } else {
2553 None
2554 }
2555 }
2556 fn syntax(&self) -> &SyntaxNode {
2557 &self.syntax
2558 }
2559}
2560impl RecordFieldList {
2561 pub fn fields(&self) -> AstChildren<RecordField> {
2562 AstChildren::new(&self.syntax)
2563 }
2564 pub fn spread(&self) -> Option<Expr> {
2565 AstChildren::new(&self.syntax).next()
2566 }
2567}
2568#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2569pub struct RecordFieldPat {
2570 pub(crate) syntax: SyntaxNode,
2571}
2572impl AstNode for RecordFieldPat {
2573 fn can_cast(kind: SyntaxKind) -> bool {
2574 match kind {
2575 RECORD_FIELD_PAT => true,
2576 _ => false,
2577 }
2578 }
2579 fn cast(syntax: SyntaxNode) -> Option<Self> {
2580 if Self::can_cast(syntax.kind()) {
2581 Some(Self { syntax })
2582 } else {
2583 None
2584 }
2585 }
2586 fn syntax(&self) -> &SyntaxNode {
2587 &self.syntax
2588 }
2589}
2590impl ast::NameOwner for RecordFieldPat {}
2591impl RecordFieldPat {
2592 pub fn pat(&self) -> Option<Pat> {
2593 AstChildren::new(&self.syntax).next()
2594 }
2595}
2596#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2597pub struct RecordFieldPatList {
2598 pub(crate) syntax: SyntaxNode,
2599}
2600impl AstNode for RecordFieldPatList {
2601 fn can_cast(kind: SyntaxKind) -> bool {
2602 match kind {
2603 RECORD_FIELD_PAT_LIST => true,
2604 _ => false,
2605 }
2606 }
2607 fn cast(syntax: SyntaxNode) -> Option<Self> {
2608 if Self::can_cast(syntax.kind()) {
2609 Some(Self { syntax })
2610 } else {
2611 None
2612 }
2613 }
2614 fn syntax(&self) -> &SyntaxNode {
2615 &self.syntax
2616 }
2617}
2618impl RecordFieldPatList {
2619 pub fn record_field_pats(&self) -> AstChildren<RecordFieldPat> {
2620 AstChildren::new(&self.syntax)
2621 }
2622 pub fn bind_pats(&self) -> AstChildren<BindPat> {
2623 AstChildren::new(&self.syntax)
2624 }
2625}
2626#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2627pub struct RecordLit {
2628 pub(crate) syntax: SyntaxNode,
2629}
2630impl AstNode for RecordLit {
2631 fn can_cast(kind: SyntaxKind) -> bool {
2632 match kind {
2633 RECORD_LIT => true,
2634 _ => false,
2635 }
2636 }
2637 fn cast(syntax: SyntaxNode) -> Option<Self> {
2638 if Self::can_cast(syntax.kind()) {
2639 Some(Self { syntax })
2640 } else {
2641 None
2642 }
2643 }
2644 fn syntax(&self) -> &SyntaxNode {
2645 &self.syntax
2646 }
2647}
2648impl RecordLit {
2649 pub fn path(&self) -> Option<Path> {
2650 AstChildren::new(&self.syntax).next()
2651 }
2652 pub fn record_field_list(&self) -> Option<RecordFieldList> {
2653 AstChildren::new(&self.syntax).next()
2654 }
2655}
2656#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2657pub struct RecordPat {
2658 pub(crate) syntax: SyntaxNode,
2659}
2660impl AstNode for RecordPat {
2661 fn can_cast(kind: SyntaxKind) -> bool {
2662 match kind {
2663 RECORD_PAT => true,
2664 _ => false,
2665 }
2666 }
2667 fn cast(syntax: SyntaxNode) -> Option<Self> {
2668 if Self::can_cast(syntax.kind()) {
2669 Some(Self { syntax })
2670 } else {
2671 None
2672 }
2673 }
2674 fn syntax(&self) -> &SyntaxNode {
2675 &self.syntax
2676 }
2677}
2678impl RecordPat {
2679 pub fn record_field_pat_list(&self) -> Option<RecordFieldPatList> {
2680 AstChildren::new(&self.syntax).next()
2681 }
2682 pub fn path(&self) -> Option<Path> {
2683 AstChildren::new(&self.syntax).next()
2684 }
2685}
2682#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2686#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2683pub struct RefExpr { 2687pub struct RefExpr {
2684 pub(crate) syntax: SyntaxNode, 2688 pub(crate) syntax: SyntaxNode,
@@ -3018,13 +3022,13 @@ impl ast::AttrsOwner for StructDef {}
3018impl ast::DocCommentsOwner for StructDef {} 3022impl ast::DocCommentsOwner for StructDef {}
3019impl StructDef {} 3023impl StructDef {}
3020#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3024#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3021pub struct StructLit { 3025pub struct TokenTree {
3022 pub(crate) syntax: SyntaxNode, 3026 pub(crate) syntax: SyntaxNode,
3023} 3027}
3024impl AstNode for StructLit { 3028impl AstNode for TokenTree {
3025 fn can_cast(kind: SyntaxKind) -> bool { 3029 fn can_cast(kind: SyntaxKind) -> bool {
3026 match kind { 3030 match kind {
3027 STRUCT_LIT => true, 3031 TOKEN_TREE => true,
3028 _ => false, 3032 _ => false,
3029 } 3033 }
3030 } 3034 }
@@ -3039,22 +3043,15 @@ impl AstNode for StructLit {
3039 &self.syntax 3043 &self.syntax
3040 } 3044 }
3041} 3045}
3042impl StructLit { 3046impl TokenTree {}
3043 pub fn path(&self) -> Option<Path> {
3044 AstChildren::new(&self.syntax).next()
3045 }
3046 pub fn named_field_list(&self) -> Option<NamedFieldList> {
3047 AstChildren::new(&self.syntax).next()
3048 }
3049}
3050#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3047#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3051pub struct StructPat { 3048pub struct TraitDef {
3052 pub(crate) syntax: SyntaxNode, 3049 pub(crate) syntax: SyntaxNode,
3053} 3050}
3054impl AstNode for StructPat { 3051impl AstNode for TraitDef {
3055 fn can_cast(kind: SyntaxKind) -> bool { 3052 fn can_cast(kind: SyntaxKind) -> bool {
3056 match kind { 3053 match kind {
3057 STRUCT_PAT => true, 3054 TRAIT_DEF => true,
3058 _ => false, 3055 _ => false,
3059 } 3056 }
3060 } 3057 }
@@ -3069,22 +3066,25 @@ impl AstNode for StructPat {
3069 &self.syntax 3066 &self.syntax
3070 } 3067 }
3071} 3068}
3072impl StructPat { 3069impl ast::VisibilityOwner for TraitDef {}
3073 pub fn field_pat_list(&self) -> Option<FieldPatList> { 3070impl ast::NameOwner for TraitDef {}
3074 AstChildren::new(&self.syntax).next() 3071impl ast::AttrsOwner for TraitDef {}
3075 } 3072impl ast::DocCommentsOwner for TraitDef {}
3076 pub fn path(&self) -> Option<Path> { 3073impl ast::TypeParamsOwner for TraitDef {}
3074impl ast::TypeBoundsOwner for TraitDef {}
3075impl TraitDef {
3076 pub fn item_list(&self) -> Option<ItemList> {
3077 AstChildren::new(&self.syntax).next() 3077 AstChildren::new(&self.syntax).next()
3078 } 3078 }
3079} 3079}
3080#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3080#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3081pub struct TokenTree { 3081pub struct TryBlockExpr {
3082 pub(crate) syntax: SyntaxNode, 3082 pub(crate) syntax: SyntaxNode,
3083} 3083}
3084impl AstNode for TokenTree { 3084impl AstNode for TryBlockExpr {
3085 fn can_cast(kind: SyntaxKind) -> bool { 3085 fn can_cast(kind: SyntaxKind) -> bool {
3086 match kind { 3086 match kind {
3087 TOKEN_TREE => true, 3087 TRY_BLOCK_EXPR => true,
3088 _ => false, 3088 _ => false,
3089 } 3089 }
3090 } 3090 }
@@ -3099,15 +3099,16 @@ impl AstNode for TokenTree {
3099 &self.syntax 3099 &self.syntax
3100 } 3100 }
3101} 3101}
3102impl TokenTree {} 3102impl ast::TryBlockBodyOwner for TryBlockExpr {}
3103impl TryBlockExpr {}
3103#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3104#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3104pub struct TraitDef { 3105pub struct TryExpr {
3105 pub(crate) syntax: SyntaxNode, 3106 pub(crate) syntax: SyntaxNode,
3106} 3107}
3107impl AstNode for TraitDef { 3108impl AstNode for TryExpr {
3108 fn can_cast(kind: SyntaxKind) -> bool { 3109 fn can_cast(kind: SyntaxKind) -> bool {
3109 match kind { 3110 match kind {
3110 TRAIT_DEF => true, 3111 TRY_EXPR => true,
3111 _ => false, 3112 _ => false,
3112 } 3113 }
3113 } 3114 }
@@ -3122,25 +3123,19 @@ impl AstNode for TraitDef {
3122 &self.syntax 3123 &self.syntax
3123 } 3124 }
3124} 3125}
3125impl ast::VisibilityOwner for TraitDef {} 3126impl TryExpr {
3126impl ast::NameOwner for TraitDef {} 3127 pub fn expr(&self) -> Option<Expr> {
3127impl ast::AttrsOwner for TraitDef {}
3128impl ast::DocCommentsOwner for TraitDef {}
3129impl ast::TypeParamsOwner for TraitDef {}
3130impl ast::TypeBoundsOwner for TraitDef {}
3131impl TraitDef {
3132 pub fn item_list(&self) -> Option<ItemList> {
3133 AstChildren::new(&self.syntax).next() 3128 AstChildren::new(&self.syntax).next()
3134 } 3129 }
3135} 3130}
3136#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3131#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3137pub struct TryBlockExpr { 3132pub struct TupleExpr {
3138 pub(crate) syntax: SyntaxNode, 3133 pub(crate) syntax: SyntaxNode,
3139} 3134}
3140impl AstNode for TryBlockExpr { 3135impl AstNode for TupleExpr {
3141 fn can_cast(kind: SyntaxKind) -> bool { 3136 fn can_cast(kind: SyntaxKind) -> bool {
3142 match kind { 3137 match kind {
3143 TRY_BLOCK_EXPR => true, 3138 TUPLE_EXPR => true,
3144 _ => false, 3139 _ => false,
3145 } 3140 }
3146 } 3141 }
@@ -3155,16 +3150,19 @@ impl AstNode for TryBlockExpr {
3155 &self.syntax 3150 &self.syntax
3156 } 3151 }
3157} 3152}
3158impl ast::TryBlockBodyOwner for TryBlockExpr {} 3153impl TupleExpr {
3159impl TryBlockExpr {} 3154 pub fn exprs(&self) -> AstChildren<Expr> {
3155 AstChildren::new(&self.syntax)
3156 }
3157}
3160#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3158#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3161pub struct TryExpr { 3159pub struct TupleFieldDef {
3162 pub(crate) syntax: SyntaxNode, 3160 pub(crate) syntax: SyntaxNode,
3163} 3161}
3164impl AstNode for TryExpr { 3162impl AstNode for TupleFieldDef {
3165 fn can_cast(kind: SyntaxKind) -> bool { 3163 fn can_cast(kind: SyntaxKind) -> bool {
3166 match kind { 3164 match kind {
3167 TRY_EXPR => true, 3165 TUPLE_FIELD_DEF => true,
3168 _ => false, 3166 _ => false,
3169 } 3167 }
3170 } 3168 }
@@ -3179,19 +3177,21 @@ impl AstNode for TryExpr {
3179 &self.syntax 3177 &self.syntax
3180 } 3178 }
3181} 3179}
3182impl TryExpr { 3180impl ast::VisibilityOwner for TupleFieldDef {}
3183 pub fn expr(&self) -> Option<Expr> { 3181impl ast::AttrsOwner for TupleFieldDef {}
3182impl TupleFieldDef {
3183 pub fn type_ref(&self) -> Option<TypeRef> {
3184 AstChildren::new(&self.syntax).next() 3184 AstChildren::new(&self.syntax).next()
3185 } 3185 }
3186} 3186}
3187#[derive(Debug, Clone, PartialEq, Eq, Hash)] 3187#[derive(Debug, Clone, PartialEq, Eq, Hash)]
3188pub struct TupleExpr { 3188pub struct TupleFieldDefList {
3189 pub(crate) syntax: SyntaxNode, 3189 pub(crate) syntax: SyntaxNode,
3190} 3190}
3191impl AstNode for TupleExpr { 3191impl AstNode for TupleFieldDefList {
3192 fn can_cast(kind: SyntaxKind) -> bool { 3192 fn can_cast(kind: SyntaxKind) -> bool {
3193 match kind { 3193 match kind {
3194 TUPLE_EXPR => true, 3194 TUPLE_FIELD_DEF_LIST => true,
3195 _ => false, 3195 _ => false,
3196 } 3196 }
3197 } 3197 }
@@ -3206,8 +3206,8 @@ impl AstNode for TupleExpr {
3206 &self.syntax 3206 &self.syntax
3207 } 3207 }
3208} 3208}
3209impl TupleExpr { 3209impl TupleFieldDefList {
3210 pub fn exprs(&self) -> AstChildren<Expr> { 3210 pub fn fields(&self) -> AstChildren<TupleFieldDef> {
3211 AstChildren::new(&self.syntax) 3211 AstChildren::new(&self.syntax)
3212 } 3212 }
3213} 3213}
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron
index 26efeeba9..4659192cd 100644
--- a/crates/ra_syntax/src/grammar.ron
+++ b/crates/ra_syntax/src/grammar.ron
@@ -161,9 +161,9 @@ Grammar(
161 "BIND_PAT", 161 "BIND_PAT",
162 "PLACEHOLDER_PAT", 162 "PLACEHOLDER_PAT",
163 "PATH_PAT", 163 "PATH_PAT",
164 "STRUCT_PAT", 164 "RECORD_PAT",
165 "FIELD_PAT_LIST", 165 "RECORD_FIELD_PAT_LIST",
166 "FIELD_PAT", 166 "RECORD_FIELD_PAT",
167 "TUPLE_STRUCT_PAT", 167 "TUPLE_STRUCT_PAT",
168 "TUPLE_PAT", 168 "TUPLE_PAT",
169 "SLICE_PAT", 169 "SLICE_PAT",
@@ -190,9 +190,9 @@ Grammar(
190 "MATCH_ARM_LIST", 190 "MATCH_ARM_LIST",
191 "MATCH_ARM", 191 "MATCH_ARM",
192 "MATCH_GUARD", 192 "MATCH_GUARD",
193 "STRUCT_LIT", 193 "RECORD_LIT",
194 "NAMED_FIELD_LIST", 194 "RECORD_FIELD_LIST",
195 "NAMED_FIELD", 195 "RECORD_FIELD",
196 "TRY_BLOCK_EXPR", 196 "TRY_BLOCK_EXPR",
197 "BOX_EXPR", 197 "BOX_EXPR",
198 198
@@ -216,10 +216,10 @@ Grammar(
216 "EXTERN_BLOCK", 216 "EXTERN_BLOCK",
217 "EXTERN_ITEM_LIST", 217 "EXTERN_ITEM_LIST",
218 "ENUM_VARIANT", 218 "ENUM_VARIANT",
219 "NAMED_FIELD_DEF_LIST", 219 "RECORD_FIELD_DEF_LIST",
220 "NAMED_FIELD_DEF", 220 "RECORD_FIELD_DEF",
221 "POS_FIELD_DEF_LIST", 221 "TUPLE_FIELD_DEF_LIST",
222 "POS_FIELD_DEF", 222 "TUPLE_FIELD_DEF",
223 "ENUM_VARIANT_LIST", 223 "ENUM_VARIANT_LIST",
224 "ITEM_LIST", 224 "ITEM_LIST",
225 "ATTR", 225 "ATTR",
@@ -286,8 +286,8 @@ Grammar(
286 "DocCommentsOwner" 286 "DocCommentsOwner"
287 ] 287 ]
288 ), 288 ),
289 "NamedFieldDefList": (collections: [("fields", "NamedFieldDef")]), 289 "RecordFieldDefList": (collections: [("fields", "RecordFieldDef")]),
290 "NamedFieldDef": ( 290 "RecordFieldDef": (
291 traits: [ 291 traits: [
292 "VisibilityOwner", 292 "VisibilityOwner",
293 "NameOwner", 293 "NameOwner",
@@ -296,8 +296,8 @@ Grammar(
296 "TypeAscriptionOwner" 296 "TypeAscriptionOwner"
297 ] 297 ]
298 ), 298 ),
299 "PosFieldDefList": (collections: [("fields", "PosFieldDef")]), 299 "TupleFieldDefList": (collections: [("fields", "TupleFieldDef")]),
300 "PosFieldDef": ( traits: ["VisibilityOwner", "AttrsOwner"], options: ["TypeRef"]), 300 "TupleFieldDef": ( traits: ["VisibilityOwner", "AttrsOwner"], options: ["TypeRef"]),
301 "EnumDef": ( traits: [ 301 "EnumDef": ( traits: [
302 "VisibilityOwner", 302 "VisibilityOwner",
303 "NameOwner", 303 "NameOwner",
@@ -461,12 +461,12 @@ Grammar(
461 traits: [ "AttrsOwner" ] 461 traits: [ "AttrsOwner" ]
462 ), 462 ),
463 "MatchGuard": (options: ["Expr"]), 463 "MatchGuard": (options: ["Expr"]),
464 "StructLit": (options: ["Path", "NamedFieldList"]), 464 "RecordLit": (options: ["Path", "RecordFieldList"]),
465 "NamedFieldList": ( 465 "RecordFieldList": (
466 collections: [ ("fields", "NamedField") ], 466 collections: [ ("fields", "RecordField") ],
467 options: [["spread", "Expr"]] 467 options: [["spread", "Expr"]]
468 ), 468 ),
469 "NamedField": (options: ["NameRef", "Expr"]), 469 "RecordField": (options: ["NameRef", "Expr"]),
470 "CallExpr": ( 470 "CallExpr": (
471 traits: ["ArgListOwner"], 471 traits: ["ArgListOwner"],
472 options: [ "Expr" ], 472 options: [ "Expr" ],
@@ -504,7 +504,7 @@ Grammar(
504 "BlockExpr", 504 "BlockExpr",
505 "ReturnExpr", 505 "ReturnExpr",
506 "MatchExpr", 506 "MatchExpr",
507 "StructLit", 507 "RecordLit",
508 "CallExpr", 508 "CallExpr",
509 "IndexExpr", 509 "IndexExpr",
510 "MethodCallExpr", 510 "MethodCallExpr",
@@ -529,14 +529,14 @@ Grammar(
529 ), 529 ),
530 "PlaceholderPat": (), 530 "PlaceholderPat": (),
531 "PathPat": ( options: [ "Path" ] ), 531 "PathPat": ( options: [ "Path" ] ),
532 "StructPat": ( options: ["FieldPatList", "Path"] ), 532 "RecordPat": ( options: ["RecordFieldPatList", "Path"] ),
533 "FieldPatList": ( 533 "RecordFieldPatList": (
534 collections: [ 534 collections: [
535 ("field_pats", "FieldPat"), 535 ("record_field_pats", "RecordFieldPat"),
536 ("bind_pats", "BindPat"), 536 ("bind_pats", "BindPat"),
537 ] 537 ]
538 ), 538 ),
539 "FieldPat": ( 539 "RecordFieldPat": (
540 traits: ["NameOwner"], 540 traits: ["NameOwner"],
541 options: ["Pat"] 541 options: ["Pat"]
542 ), 542 ),
@@ -555,7 +555,7 @@ Grammar(
555 "BindPat", 555 "BindPat",
556 "PlaceholderPat", 556 "PlaceholderPat",
557 "PathPat", 557 "PathPat",
558 "StructPat", 558 "RecordPat",
559 "TupleStructPat", 559 "TupleStructPat",
560 "TuplePat", 560 "TuplePat",
561 "SlicePat", 561 "SlicePat",
diff --git a/crates/ra_syntax/src/parsing/text_tree_sink.rs b/crates/ra_syntax/src/parsing/text_tree_sink.rs
index bf1b35c95..f59c559e9 100644
--- a/crates/ra_syntax/src/parsing/text_tree_sink.rs
+++ b/crates/ra_syntax/src/parsing/text_tree_sink.rs
@@ -145,7 +145,7 @@ fn n_attached_trivias<'a>(
145) -> usize { 145) -> usize {
146 match kind { 146 match kind {
147 CONST_DEF | TYPE_ALIAS_DEF | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN_DEF | TRAIT_DEF 147 CONST_DEF | TYPE_ALIAS_DEF | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN_DEF | TRAIT_DEF
148 | MODULE | NAMED_FIELD_DEF => { 148 | MODULE | RECORD_FIELD_DEF => {
149 let mut res = 0; 149 let mut res = 0;
150 for (i, (kind, text)) in trivias.enumerate() { 150 for (i, (kind, text)) in trivias.enumerate() {
151 match kind { 151 match kind {
diff --git a/crates/ra_syntax/src/ptr.rs b/crates/ra_syntax/src/ptr.rs
index 8665c8976..d24660ac3 100644
--- a/crates/ra_syntax/src/ptr.rs
+++ b/crates/ra_syntax/src/ptr.rs
@@ -80,7 +80,7 @@ fn test_local_syntax_ptr() {
80 use crate::{ast, AstNode, SourceFile}; 80 use crate::{ast, AstNode, SourceFile};
81 81
82 let file = SourceFile::parse("struct Foo { f: u32, }").ok().unwrap(); 82 let file = SourceFile::parse("struct Foo { f: u32, }").ok().unwrap();
83 let field = file.syntax().descendants().find_map(ast::NamedFieldDef::cast).unwrap(); 83 let field = file.syntax().descendants().find_map(ast::RecordFieldDef::cast).unwrap();
84 let ptr = SyntaxNodePtr::new(field.syntax()); 84 let ptr = SyntaxNodePtr::new(field.syntax());
85 let field_syntax = ptr.to_node(file.syntax()); 85 let field_syntax = ptr.to_node(file.syntax());
86 assert_eq!(field.syntax(), &field_syntax); 86 assert_eq!(field.syntax(), &field_syntax);
diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs
index a8c789e0c..ee8797410 100644
--- a/crates/ra_syntax/src/validation.rs
+++ b/crates/ra_syntax/src/validation.rs
@@ -99,7 +99,7 @@ pub(crate) fn validate(root: &SyntaxNode) -> Vec<SyntaxError> {
99 .visit::<ast::Literal, _>(validate_literal) 99 .visit::<ast::Literal, _>(validate_literal)
100 .visit::<ast::Block, _>(block::validate_block_node) 100 .visit::<ast::Block, _>(block::validate_block_node)
101 .visit::<ast::FieldExpr, _>(|it, errors| validate_numeric_name(it.name_ref(), errors)) 101 .visit::<ast::FieldExpr, _>(|it, errors| validate_numeric_name(it.name_ref(), errors))
102 .visit::<ast::NamedField, _>(|it, errors| validate_numeric_name(it.name_ref(), errors)) 102 .visit::<ast::RecordField, _>(|it, errors| validate_numeric_name(it.name_ref(), errors))
103 .accept(&node); 103 .accept(&node);
104 } 104 }
105 errors 105 errors
diff --git a/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt b/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt
index 0dbbfe853..dc143945a 100644
--- a/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt
+++ b/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt
@@ -5,10 +5,10 @@ SOURCE_FILE@[0; 34)
5 NAME@[7; 8) 5 NAME@[7; 8)
6 IDENT@[7; 8) "S" 6 IDENT@[7; 8) "S"
7 WHITESPACE@[8; 9) " " 7 WHITESPACE@[8; 9) " "
8 NAMED_FIELD_DEF_LIST@[9; 34) 8 RECORD_FIELD_DEF_LIST@[9; 34)
9 L_CURLY@[9; 10) "{" 9 L_CURLY@[9; 10) "{"
10 WHITESPACE@[10; 15) "\n " 10 WHITESPACE@[10; 15) "\n "
11 NAMED_FIELD_DEF@[15; 21) 11 RECORD_FIELD_DEF@[15; 21)
12 NAME@[15; 16) 12 NAME@[15; 16)
13 IDENT@[15; 16) "a" 13 IDENT@[15; 16) "a"
14 COLON@[16; 17) ":" 14 COLON@[16; 17) ":"
@@ -19,7 +19,7 @@ SOURCE_FILE@[0; 34)
19 NAME_REF@[18; 21) 19 NAME_REF@[18; 21)
20 IDENT@[18; 21) "u32" 20 IDENT@[18; 21) "u32"
21 WHITESPACE@[21; 26) "\n " 21 WHITESPACE@[21; 26) "\n "
22 NAMED_FIELD_DEF@[26; 32) 22 RECORD_FIELD_DEF@[26; 32)
23 NAME@[26; 27) 23 NAME@[26; 27)
24 IDENT@[26; 27) "b" 24 IDENT@[26; 27) "b"
25 COLON@[27; 28) ":" 25 COLON@[27; 28) ":"
diff --git a/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt b/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt
index 7cfb54ef8..181bcdb9e 100644
--- a/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt
+++ b/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt
@@ -11,7 +11,7 @@ SOURCE_FILE@[0; 21)
11 NAME@[17; 18) 11 NAME@[17; 18)
12 IDENT@[17; 18) "S" 12 IDENT@[17; 18) "S"
13 WHITESPACE@[18; 19) " " 13 WHITESPACE@[18; 19) " "
14 NAMED_FIELD_DEF_LIST@[19; 21) 14 RECORD_FIELD_DEF_LIST@[19; 21)
15 L_CURLY@[19; 20) "{" 15 L_CURLY@[19; 20) "{"
16 R_CURLY@[20; 21) "}" 16 R_CURLY@[20; 21) "}"
17error 0: expected an item 17error 0: expected an item
diff --git a/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt b/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt
index 857826037..58d005902 100644
--- a/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt
+++ b/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt
@@ -5,10 +5,10 @@ SOURCE_FILE@[0; 40)
5 NAME@[7; 8) 5 NAME@[7; 8)
6 IDENT@[7; 8) "S" 6 IDENT@[7; 8) "S"
7 WHITESPACE@[8; 9) " " 7 WHITESPACE@[8; 9) " "
8 NAMED_FIELD_DEF_LIST@[9; 39) 8 RECORD_FIELD_DEF_LIST@[9; 39)
9 L_CURLY@[9; 10) "{" 9 L_CURLY@[9; 10) "{"
10 WHITESPACE@[10; 15) "\n " 10 WHITESPACE@[10; 15) "\n "
11 NAMED_FIELD_DEF@[15; 21) 11 RECORD_FIELD_DEF@[15; 21)
12 NAME@[15; 16) 12 NAME@[15; 16)
13 IDENT@[15; 16) "a" 13 IDENT@[15; 16) "a"
14 COLON@[16; 17) ":" 14 COLON@[16; 17) ":"
@@ -20,7 +20,7 @@ SOURCE_FILE@[0; 40)
20 IDENT@[18; 21) "i32" 20 IDENT@[18; 21) "i32"
21 COMMA@[21; 22) "," 21 COMMA@[21; 22) ","
22 WHITESPACE@[22; 27) "\n " 22 WHITESPACE@[22; 27) "\n "
23 NAMED_FIELD_DEF@[27; 36) 23 RECORD_FIELD_DEF@[27; 36)
24 NAME@[27; 28) 24 NAME@[27; 28)
25 IDENT@[27; 28) "b" 25 IDENT@[27; 28) "b"
26 COLON@[28; 29) ":" 26 COLON@[28; 29) ":"
diff --git a/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt b/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt
index 6143e68f1..5f5198b31 100644
--- a/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt
+++ b/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt
@@ -5,10 +5,10 @@ SOURCE_FILE@[0; 74)
5 NAME@[7; 8) 5 NAME@[7; 8)
6 IDENT@[7; 8) "S" 6 IDENT@[7; 8) "S"
7 WHITESPACE@[8; 9) " " 7 WHITESPACE@[8; 9) " "
8 NAMED_FIELD_DEF_LIST@[9; 73) 8 RECORD_FIELD_DEF_LIST@[9; 73)
9 L_CURLY@[9; 10) "{" 9 L_CURLY@[9; 10) "{"
10 WHITESPACE@[10; 15) "\n " 10 WHITESPACE@[10; 15) "\n "
11 NAMED_FIELD_DEF@[15; 21) 11 RECORD_FIELD_DEF@[15; 21)
12 NAME@[15; 16) 12 NAME@[15; 16)
13 IDENT@[15; 16) "f" 13 IDENT@[15; 16) "f"
14 COLON@[16; 17) ":" 14 COLON@[16; 17) ":"
@@ -35,7 +35,7 @@ SOURCE_FILE@[0; 74)
35 ERROR@[42; 43) 35 ERROR@[42; 43)
36 STAR@[42; 43) "*" 36 STAR@[42; 43) "*"
37 WHITESPACE@[43; 48) "\n " 37 WHITESPACE@[43; 48) "\n "
38 NAMED_FIELD_DEF@[48; 58) 38 RECORD_FIELD_DEF@[48; 58)
39 VISIBILITY@[48; 51) 39 VISIBILITY@[48; 51)
40 PUB_KW@[48; 51) "pub" 40 PUB_KW@[48; 51) "pub"
41 WHITESPACE@[51; 52) " " 41 WHITESPACE@[51; 52) " "
@@ -50,7 +50,7 @@ SOURCE_FILE@[0; 74)
50 IDENT@[55; 58) "u32" 50 IDENT@[55; 58) "u32"
51 COMMA@[58; 59) "," 51 COMMA@[58; 59) ","
52 WHITESPACE@[59; 64) "\n " 52 WHITESPACE@[59; 64) "\n "
53 NAMED_FIELD_DEF@[64; 70) 53 RECORD_FIELD_DEF@[64; 70)
54 NAME@[64; 65) 54 NAME@[64; 65)
55 IDENT@[64; 65) "z" 55 IDENT@[64; 65) "z"
56 COLON@[65; 66) ":" 56 COLON@[65; 66) ":"
diff --git a/crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt b/crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt
index bef286b37..4907bac6d 100644
--- a/crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt
+++ b/crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt
@@ -7,10 +7,10 @@ SOURCE_FILE@[0; 86)
7 WHITESPACE@[10; 11) " " 7 WHITESPACE@[10; 11) " "
8 NAME@[11; 16) 8 NAME@[11; 16)
9 IDENT@[11; 16) "Cache" 9 IDENT@[11; 16) "Cache"
10 POS_FIELD_DEF_LIST@[16; 72) 10 TUPLE_FIELD_DEF_LIST@[16; 72)
11 L_PAREN@[16; 17) "(" 11 L_PAREN@[16; 17) "("
12 WHITESPACE@[17; 22) "\n " 12 WHITESPACE@[17; 22) "\n "
13 POS_FIELD_DEF@[22; 68) 13 TUPLE_FIELD_DEF@[22; 68)
14 PATH_TYPE@[22; 68) 14 PATH_TYPE@[22; 68)
15 PATH@[22; 68) 15 PATH@[22; 68)
16 PATH_SEGMENT@[22; 68) 16 PATH_SEGMENT@[22; 68)
@@ -47,7 +47,7 @@ SOURCE_FILE@[0; 86)
47 ERROR@[67; 68) 47 ERROR@[67; 68)
48 AT@[67; 68) "@" 48 AT@[67; 68) "@"
49 WHITESPACE@[68; 69) " " 49 WHITESPACE@[68; 69) " "
50 POS_FIELD_DEF@[69; 72) 50 TUPLE_FIELD_DEF@[69; 72)
51 PATH_TYPE@[69; 72) 51 PATH_TYPE@[69; 72)
52 PATH@[69; 72) 52 PATH@[69; 72)
53 PATH_SEGMENT@[69; 72) 53 PATH_SEGMENT@[69; 72)
diff --git a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt
index 51def2d8f..52eb7d5e2 100644
--- a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt
+++ b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt
@@ -75,16 +75,16 @@ SOURCE_FILE@[0; 183)
75 IDENT@[106; 110) "push" 75 IDENT@[106; 110) "push"
76 ARG_LIST@[110; 155) 76 ARG_LIST@[110; 155)
77 L_PAREN@[110; 111) "(" 77 L_PAREN@[110; 111) "("
78 STRUCT_LIT@[111; 154) 78 RECORD_LIT@[111; 154)
79 PATH@[111; 120) 79 PATH@[111; 120)
80 PATH_SEGMENT@[111; 120) 80 PATH_SEGMENT@[111; 120)
81 NAME_REF@[111; 120) 81 NAME_REF@[111; 120)
82 IDENT@[111; 120) "ScopeData" 82 IDENT@[111; 120) "ScopeData"
83 WHITESPACE@[120; 121) " " 83 WHITESPACE@[120; 121) " "
84 NAMED_FIELD_LIST@[121; 154) 84 RECORD_FIELD_LIST@[121; 154)
85 L_CURLY@[121; 122) "{" 85 L_CURLY@[121; 122) "{"
86 WHITESPACE@[122; 123) " " 86 WHITESPACE@[122; 123) " "
87 NAMED_FIELD@[123; 135) 87 RECORD_FIELD@[123; 135)
88 NAME_REF@[123; 129) 88 NAME_REF@[123; 129)
89 IDENT@[123; 129) "parent" 89 IDENT@[123; 129) "parent"
90 COLON@[129; 130) ":" 90 COLON@[129; 130) ":"
@@ -96,7 +96,7 @@ SOURCE_FILE@[0; 183)
96 IDENT@[131; 135) "None" 96 IDENT@[131; 135) "None"
97 COMMA@[135; 136) "," 97 COMMA@[135; 136) ","
98 WHITESPACE@[136; 137) " " 98 WHITESPACE@[136; 137) " "
99 NAMED_FIELD@[137; 152) 99 RECORD_FIELD@[137; 152)
100 NAME_REF@[137; 144) 100 NAME_REF@[137; 144)
101 IDENT@[137; 144) "entries" 101 IDENT@[137; 144) "entries"
102 COLON@[144; 145) ":" 102 COLON@[144; 145) ":"
diff --git a/crates/ra_syntax/test_data/parser/err/0025_nope.txt b/crates/ra_syntax/test_data/parser/err/0025_nope.txt
index 0a3952dc9..7b228a8ed 100644
--- a/crates/ra_syntax/test_data/parser/err/0025_nope.txt
+++ b/crates/ra_syntax/test_data/parser/err/0025_nope.txt
@@ -28,9 +28,9 @@ SOURCE_FILE@[0; 575)
28 ENUM_VARIANT@[50; 62) 28 ENUM_VARIANT@[50; 62)
29 NAME@[50; 54) 29 NAME@[50; 54)
30 IDENT@[50; 54) "Var2" 30 IDENT@[50; 54) "Var2"
31 POS_FIELD_DEF_LIST@[54; 62) 31 TUPLE_FIELD_DEF_LIST@[54; 62)
32 L_PAREN@[54; 55) "(" 32 L_PAREN@[54; 55) "("
33 POS_FIELD_DEF@[55; 61) 33 TUPLE_FIELD_DEF@[55; 61)
34 PATH_TYPE@[55; 61) 34 PATH_TYPE@[55; 61)
35 PATH@[55; 61) 35 PATH@[55; 61)
36 PATH_SEGMENT@[55; 61) 36 PATH_SEGMENT@[55; 61)
@@ -43,10 +43,10 @@ SOURCE_FILE@[0; 575)
43 NAME@[72; 76) 43 NAME@[72; 76)
44 IDENT@[72; 76) "Var3" 44 IDENT@[72; 76) "Var3"
45 WHITESPACE@[76; 77) " " 45 WHITESPACE@[76; 77) " "
46 NAMED_FIELD_DEF_LIST@[77; 145) 46 RECORD_FIELD_DEF_LIST@[77; 145)
47 L_CURLY@[77; 78) "{" 47 L_CURLY@[77; 78) "{"
48 WHITESPACE@[78; 91) "\n " 48 WHITESPACE@[78; 91) "\n "
49 NAMED_FIELD_DEF@[91; 95) 49 RECORD_FIELD_DEF@[91; 95)
50 NAME@[91; 94) 50 NAME@[91; 94)
51 IDENT@[91; 94) "abc" 51 IDENT@[91; 94) "abc"
52 COLON@[94; 95) ":" 52 COLON@[94; 95) ":"
@@ -108,10 +108,10 @@ SOURCE_FILE@[0; 575)
108 NAME@[250; 259) 108 NAME@[250; 259)
109 IDENT@[250; 259) "StillFine" 109 IDENT@[250; 259) "StillFine"
110 WHITESPACE@[259; 260) " " 110 WHITESPACE@[259; 260) " "
111 NAMED_FIELD_DEF_LIST@[260; 293) 111 RECORD_FIELD_DEF_LIST@[260; 293)
112 L_CURLY@[260; 261) "{" 112 L_CURLY@[260; 261) "{"
113 WHITESPACE@[261; 274) "\n " 113 WHITESPACE@[261; 274) "\n "
114 NAMED_FIELD_DEF@[274; 282) 114 RECORD_FIELD_DEF@[274; 282)
115 NAME@[274; 277) 115 NAME@[274; 277)
116 IDENT@[274; 277) "def" 116 IDENT@[274; 277) "def"
117 COLON@[277; 278) ":" 117 COLON@[277; 278) ":"
@@ -147,9 +147,9 @@ SOURCE_FILE@[0; 575)
147 ENUM_VARIANT@[363; 372) 147 ENUM_VARIANT@[363; 372)
148 NAME@[363; 367) 148 NAME@[363; 367)
149 IDENT@[363; 367) "Nope" 149 IDENT@[363; 367) "Nope"
150 POS_FIELD_DEF_LIST@[367; 372) 150 TUPLE_FIELD_DEF_LIST@[367; 372)
151 L_PAREN@[367; 368) "(" 151 L_PAREN@[367; 368) "("
152 POS_FIELD_DEF@[368; 371) 152 TUPLE_FIELD_DEF@[368; 371)
153 PATH_TYPE@[368; 371) 153 PATH_TYPE@[368; 371)
154 PATH@[368; 371) 154 PATH@[368; 371)
155 PATH_SEGMENT@[368; 371) 155 PATH_SEGMENT@[368; 371)
diff --git a/crates/ra_syntax/test_data/parser/fuzz-failures/0000.rs b/crates/ra_syntax/test_data/parser/fuzz-failures/0000.rs
index e0437d163..0e6e0ccc3 100644
--- a/crates/ra_syntax/test_data/parser/fuzz-failures/0000.rs
+++ b/crates/ra_syntax/test_data/parser/fuzz-failures/0000.rs
@@ -86,7 +86,7 @@ fn find_reparsable_node(node: SyntaxNodeRef, range: TextRange) -> Option<(Syntax
86 fn reparser(node: SyntaxNodeRef) -> Option<fn(&mut Parser)> { 86 fn reparser(node: SyntaxNodeRef) -> Option<fn(&mut Parser)> {
87 let res = match node.kind() { 87 let res = match node.kind() {
88 BLOCK => grammar::block, 88 BLOCK => grammar::block,
89 NAMED_FIELD_DEF_LIST => grammar::named_field_def_list, 89 RECORD_FIELD_DEF_LIST => grammar::record_field_def_list,
90 _ => return None, 90 _ => return None,
91 }; 91 };
92 Some(res) 92 Some(res)
@@ -138,7 +138,7 @@ fn find_reparsable_node(node: SyntaxNodeRef, range: TextRange) -> Option<(Syntax
138 let res = match node.kind() { 138 let res = match node.kind() {
139 ; 139 ;
140 let end = u32::from(range.end()) as usize; 140 let end = u32::from(range.end()) as usize;
141 text.replaT => grammar::named_field_def_list, 141 text.replaT => grammar::record_field_def_list,
142 _ => return None, 142 _ => return None,
143 }; 143 };
144 Some(res) 144 Some(res)
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.txt b/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.txt
index 0c6be485e..4108762e5 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.txt
@@ -52,13 +52,13 @@ SOURCE_FILE@[0; 103)
52 LET_STMT@[58; 78) 52 LET_STMT@[58; 78)
53 LET_KW@[58; 61) "let" 53 LET_KW@[58; 61) "let"
54 WHITESPACE@[61; 62) " " 54 WHITESPACE@[61; 62) " "
55 STRUCT_PAT@[62; 72) 55 RECORD_PAT@[62; 72)
56 PATH@[62; 65) 56 PATH@[62; 65)
57 PATH_SEGMENT@[62; 65) 57 PATH_SEGMENT@[62; 65)
58 NAME_REF@[62; 65) 58 NAME_REF@[62; 65)
59 IDENT@[62; 65) "Bar" 59 IDENT@[62; 65) "Bar"
60 WHITESPACE@[65; 66) " " 60 WHITESPACE@[65; 66) " "
61 FIELD_PAT_LIST@[66; 72) 61 RECORD_FIELD_PAT_LIST@[66; 72)
62 L_CURLY@[66; 67) "{" 62 L_CURLY@[66; 67) "{"
63 WHITESPACE@[67; 68) " " 63 WHITESPACE@[67; 68) " "
64 DOTDOT@[68; 70) ".." 64 DOTDOT@[68; 70) ".."
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.txt b/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.txt
index fb8246174..882e4a9ae 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.txt
@@ -22,10 +22,10 @@ SOURCE_FILE@[0; 71)
22 NAME@[27; 28) 22 NAME@[27; 28)
23 IDENT@[27; 28) "S" 23 IDENT@[27; 28) "S"
24 WHITESPACE@[28; 29) " " 24 WHITESPACE@[28; 29) " "
25 NAMED_FIELD_DEF_LIST@[29; 49) 25 RECORD_FIELD_DEF_LIST@[29; 49)
26 L_CURLY@[29; 30) "{" 26 L_CURLY@[29; 30) "{"
27 WHITESPACE@[30; 31) " " 27 WHITESPACE@[30; 31) " "
28 NAMED_FIELD_DEF@[31; 47) 28 RECORD_FIELD_DEF@[31; 47)
29 VISIBILITY@[31; 36) 29 VISIBILITY@[31; 36)
30 CRATE_KW@[31; 36) "crate" 30 CRATE_KW@[31; 36) "crate"
31 WHITESPACE@[36; 37) " " 31 WHITESPACE@[36; 37) " "
@@ -46,9 +46,9 @@ SOURCE_FILE@[0; 71)
46 WHITESPACE@[56; 57) " " 46 WHITESPACE@[56; 57) " "
47 NAME@[57; 58) 47 NAME@[57; 58)
48 IDENT@[57; 58) "T" 48 IDENT@[57; 58) "T"
49 POS_FIELD_DEF_LIST@[58; 69) 49 TUPLE_FIELD_DEF_LIST@[58; 69)
50 L_PAREN@[58; 59) "(" 50 L_PAREN@[58; 59) "("
51 POS_FIELD_DEF@[59; 68) 51 TUPLE_FIELD_DEF@[59; 68)
52 VISIBILITY@[59; 64) 52 VISIBILITY@[59; 64)
53 CRATE_KW@[59; 64) "crate" 53 CRATE_KW@[59; 64) "crate"
54 WHITESPACE@[64; 65) " " 54 WHITESPACE@[64; 65) " "
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0054_field_attrs.rs b/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rs
index 4744d8ac0..4744d8ac0 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0054_field_attrs.rs
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rs
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0054_field_attrs.txt b/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.txt
index f214d1d47..56aeba768 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0054_field_attrs.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.txt
@@ -5,10 +5,10 @@ SOURCE_FILE@[0; 64)
5 NAME@[7; 8) 5 NAME@[7; 8)
6 IDENT@[7; 8) "S" 6 IDENT@[7; 8) "S"
7 WHITESPACE@[8; 9) " " 7 WHITESPACE@[8; 9) " "
8 NAMED_FIELD_DEF_LIST@[9; 63) 8 RECORD_FIELD_DEF_LIST@[9; 63)
9 L_CURLY@[9; 10) "{" 9 L_CURLY@[9; 10) "{"
10 WHITESPACE@[10; 15) "\n " 10 WHITESPACE@[10; 15) "\n "
11 NAMED_FIELD_DEF@[15; 60) 11 RECORD_FIELD_DEF@[15; 60)
12 ATTR@[15; 43) 12 ATTR@[15; 43)
13 POUND@[15; 16) "#" 13 POUND@[15; 16) "#"
14 TOKEN_TREE@[16; 43) 14 TOKEN_TREE@[16; 43)
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0061_struct_lit.rs b/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rs
index 6285e5549..6285e5549 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0061_struct_lit.rs
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rs
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0061_struct_lit.txt b/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.txt
index d06594cae..1c915ea0c 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0061_struct_lit.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.txt
@@ -12,33 +12,33 @@ SOURCE_FILE@[0; 112)
12 L_CURLY@[9; 10) "{" 12 L_CURLY@[9; 10) "{"
13 WHITESPACE@[10; 15) "\n " 13 WHITESPACE@[10; 15) "\n "
14 EXPR_STMT@[15; 20) 14 EXPR_STMT@[15; 20)
15 STRUCT_LIT@[15; 19) 15 RECORD_LIT@[15; 19)
16 PATH@[15; 16) 16 PATH@[15; 16)
17 PATH_SEGMENT@[15; 16) 17 PATH_SEGMENT@[15; 16)
18 NAME_REF@[15; 16) 18 NAME_REF@[15; 16)
19 IDENT@[15; 16) "S" 19 IDENT@[15; 16) "S"
20 WHITESPACE@[16; 17) " " 20 WHITESPACE@[16; 17) " "
21 NAMED_FIELD_LIST@[17; 19) 21 RECORD_FIELD_LIST@[17; 19)
22 L_CURLY@[17; 18) "{" 22 L_CURLY@[17; 18) "{"
23 R_CURLY@[18; 19) "}" 23 R_CURLY@[18; 19) "}"
24 SEMI@[19; 20) ";" 24 SEMI@[19; 20) ";"
25 WHITESPACE@[20; 25) "\n " 25 WHITESPACE@[20; 25) "\n "
26 EXPR_STMT@[25; 41) 26 EXPR_STMT@[25; 41)
27 STRUCT_LIT@[25; 40) 27 RECORD_LIT@[25; 40)
28 PATH@[25; 26) 28 PATH@[25; 26)
29 PATH_SEGMENT@[25; 26) 29 PATH_SEGMENT@[25; 26)
30 NAME_REF@[25; 26) 30 NAME_REF@[25; 26)
31 IDENT@[25; 26) "S" 31 IDENT@[25; 26) "S"
32 WHITESPACE@[26; 27) " " 32 WHITESPACE@[26; 27) " "
33 NAMED_FIELD_LIST@[27; 40) 33 RECORD_FIELD_LIST@[27; 40)
34 L_CURLY@[27; 28) "{" 34 L_CURLY@[27; 28) "{"
35 WHITESPACE@[28; 29) " " 35 WHITESPACE@[28; 29) " "
36 NAMED_FIELD@[29; 30) 36 RECORD_FIELD@[29; 30)
37 NAME_REF@[29; 30) 37 NAME_REF@[29; 30)
38 IDENT@[29; 30) "x" 38 IDENT@[29; 30) "x"
39 COMMA@[30; 31) "," 39 COMMA@[30; 31) ","
40 WHITESPACE@[31; 32) " " 40 WHITESPACE@[31; 32) " "
41 NAMED_FIELD@[32; 37) 41 RECORD_FIELD@[32; 37)
42 NAME_REF@[32; 33) 42 NAME_REF@[32; 33)
43 IDENT@[32; 33) "y" 43 IDENT@[32; 33) "y"
44 COLON@[33; 34) ":" 44 COLON@[33; 34) ":"
@@ -51,21 +51,21 @@ SOURCE_FILE@[0; 112)
51 SEMI@[40; 41) ";" 51 SEMI@[40; 41) ";"
52 WHITESPACE@[41; 46) "\n " 52 WHITESPACE@[41; 46) "\n "
53 EXPR_STMT@[46; 83) 53 EXPR_STMT@[46; 83)
54 STRUCT_LIT@[46; 82) 54 RECORD_LIT@[46; 82)
55 PATH@[46; 47) 55 PATH@[46; 47)
56 PATH_SEGMENT@[46; 47) 56 PATH_SEGMENT@[46; 47)
57 NAME_REF@[46; 47) 57 NAME_REF@[46; 47)
58 IDENT@[46; 47) "S" 58 IDENT@[46; 47) "S"
59 WHITESPACE@[47; 48) " " 59 WHITESPACE@[47; 48) " "
60 NAMED_FIELD_LIST@[48; 82) 60 RECORD_FIELD_LIST@[48; 82)
61 L_CURLY@[48; 49) "{" 61 L_CURLY@[48; 49) "{"
62 WHITESPACE@[49; 50) " " 62 WHITESPACE@[49; 50) " "
63 NAMED_FIELD@[50; 51) 63 RECORD_FIELD@[50; 51)
64 NAME_REF@[50; 51) 64 NAME_REF@[50; 51)
65 IDENT@[50; 51) "x" 65 IDENT@[50; 51) "x"
66 COMMA@[51; 52) "," 66 COMMA@[51; 52) ","
67 WHITESPACE@[52; 53) " " 67 WHITESPACE@[52; 53) " "
68 NAMED_FIELD@[53; 58) 68 RECORD_FIELD@[53; 58)
69 NAME_REF@[53; 54) 69 NAME_REF@[53; 54)
70 IDENT@[53; 54) "y" 70 IDENT@[53; 54) "y"
71 COLON@[54; 55) ":" 71 COLON@[54; 55) ":"
@@ -94,16 +94,16 @@ SOURCE_FILE@[0; 112)
94 SEMI@[82; 83) ";" 94 SEMI@[82; 83) ";"
95 WHITESPACE@[83; 88) "\n " 95 WHITESPACE@[83; 88) "\n "
96 EXPR_STMT@[88; 109) 96 EXPR_STMT@[88; 109)
97 STRUCT_LIT@[88; 108) 97 RECORD_LIT@[88; 108)
98 PATH@[88; 99) 98 PATH@[88; 99)
99 PATH_SEGMENT@[88; 99) 99 PATH_SEGMENT@[88; 99)
100 NAME_REF@[88; 99) 100 NAME_REF@[88; 99)
101 IDENT@[88; 99) "TupleStruct" 101 IDENT@[88; 99) "TupleStruct"
102 WHITESPACE@[99; 100) " " 102 WHITESPACE@[99; 100) " "
103 NAMED_FIELD_LIST@[100; 108) 103 RECORD_FIELD_LIST@[100; 108)
104 L_CURLY@[100; 101) "{" 104 L_CURLY@[100; 101) "{"
105 WHITESPACE@[101; 102) " " 105 WHITESPACE@[101; 102) " "
106 NAMED_FIELD@[102; 106) 106 RECORD_FIELD@[102; 106)
107 NAME_REF@[102; 103) 107 NAME_REF@[102; 103)
108 INT_NUMBER@[102; 103) "0" 108 INT_NUMBER@[102; 103) "0"
109 COLON@[103; 104) ":" 109 COLON@[103; 104) ":"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.txt b/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.txt
index 28d501459..35f023782 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.txt
@@ -49,14 +49,14 @@ SOURCE_FILE@[0; 215)
49 WHITESPACE@[60; 61) " " 49 WHITESPACE@[60; 61) " "
50 R_ANGLE@[61; 62) ">" 50 R_ANGLE@[61; 62) ">"
51 WHITESPACE@[62; 63) " " 51 WHITESPACE@[62; 63) " "
52 STRUCT_LIT@[63; 77) 52 RECORD_LIT@[63; 77)
53 PATH@[63; 67) 53 PATH@[63; 67)
54 PATH_SEGMENT@[63; 67) 54 PATH_SEGMENT@[63; 67)
55 NAME_REF@[63; 67) 55 NAME_REF@[63; 67)
56 IDENT@[63; 67) "Test" 56 IDENT@[63; 67) "Test"
57 NAMED_FIELD_LIST@[67; 77) 57 RECORD_FIELD_LIST@[67; 77)
58 L_CURLY@[67; 68) "{" 58 L_CURLY@[67; 68) "{"
59 NAMED_FIELD@[68; 76) 59 RECORD_FIELD@[68; 76)
60 NAME_REF@[68; 73) 60 NAME_REF@[68; 73)
61 IDENT@[68; 73) "field" 61 IDENT@[68; 73) "field"
62 COLON@[73; 74) ":" 62 COLON@[73; 74) ":"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.txt b/crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.txt
index 4b653317b..f9ace02ee 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.txt
@@ -5,7 +5,7 @@ SOURCE_FILE@[0; 51)
5 NAME@[6; 9) 5 NAME@[6; 9)
6 IDENT@[6; 9) "Foo" 6 IDENT@[6; 9) "Foo"
7 WHITESPACE@[9; 10) " " 7 WHITESPACE@[9; 10) " "
8 NAMED_FIELD_DEF_LIST@[10; 12) 8 RECORD_FIELD_DEF_LIST@[10; 12)
9 L_CURLY@[10; 11) "{" 9 L_CURLY@[10; 11) "{"
10 R_CURLY@[11; 12) "}" 10 R_CURLY@[11; 12) "}"
11 WHITESPACE@[12; 13) "\n" 11 WHITESPACE@[12; 13) "\n"
@@ -15,10 +15,10 @@ SOURCE_FILE@[0; 51)
15 NAME@[19; 22) 15 NAME@[19; 22)
16 IDENT@[19; 22) "Foo" 16 IDENT@[19; 22) "Foo"
17 WHITESPACE@[22; 23) " " 17 WHITESPACE@[22; 23) " "
18 NAMED_FIELD_DEF_LIST@[23; 50) 18 RECORD_FIELD_DEF_LIST@[23; 50)
19 L_CURLY@[23; 24) "{" 19 L_CURLY@[23; 24) "{"
20 WHITESPACE@[24; 29) "\n " 20 WHITESPACE@[24; 29) "\n "
21 NAMED_FIELD_DEF@[29; 35) 21 RECORD_FIELD_DEF@[29; 35)
22 NAME@[29; 30) 22 NAME@[29; 30)
23 IDENT@[29; 30) "a" 23 IDENT@[29; 30) "a"
24 COLON@[30; 31) ":" 24 COLON@[30; 31) ":"
@@ -30,7 +30,7 @@ SOURCE_FILE@[0; 51)
30 IDENT@[32; 35) "i32" 30 IDENT@[32; 35) "i32"
31 COMMA@[35; 36) "," 31 COMMA@[35; 36) ","
32 WHITESPACE@[36; 41) "\n " 32 WHITESPACE@[36; 41) "\n "
33 NAMED_FIELD_DEF@[41; 47) 33 RECORD_FIELD_DEF@[41; 47)
34 NAME@[41; 42) 34 NAME@[41; 42)
35 IDENT@[41; 42) "b" 35 IDENT@[41; 42) "b"
36 COLON@[42; 43) ":" 36 COLON@[42; 43) ":"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.txt b/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.txt
index 62d93512b..e909f2b78 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.txt
@@ -12,7 +12,7 @@ SOURCE_FILE@[0; 106)
12 NAME@[19; 22) 12 NAME@[19; 22)
13 IDENT@[19; 22) "Foo" 13 IDENT@[19; 22) "Foo"
14 WHITESPACE@[22; 23) " " 14 WHITESPACE@[22; 23) " "
15 NAMED_FIELD_DEF_LIST@[23; 25) 15 RECORD_FIELD_DEF_LIST@[23; 25)
16 L_CURLY@[23; 24) "{" 16 L_CURLY@[23; 24) "{"
17 R_CURLY@[24; 25) "}" 17 R_CURLY@[24; 25) "}"
18 WHITESPACE@[25; 26) "\n" 18 WHITESPACE@[25; 26) "\n"
@@ -21,7 +21,7 @@ SOURCE_FILE@[0; 106)
21 WHITESPACE@[32; 33) " " 21 WHITESPACE@[32; 33) " "
22 NAME@[33; 36) 22 NAME@[33; 36)
23 IDENT@[33; 36) "Foo" 23 IDENT@[33; 36) "Foo"
24 POS_FIELD_DEF_LIST@[36; 38) 24 TUPLE_FIELD_DEF_LIST@[36; 38)
25 L_PAREN@[36; 37) "(" 25 L_PAREN@[36; 37) "("
26 R_PAREN@[37; 38) ")" 26 R_PAREN@[37; 38) ")"
27 SEMI@[38; 39) ";" 27 SEMI@[38; 39) ";"
@@ -31,9 +31,9 @@ SOURCE_FILE@[0; 106)
31 WHITESPACE@[46; 47) " " 31 WHITESPACE@[46; 47) " "
32 NAME@[47; 50) 32 NAME@[47; 50)
33 IDENT@[47; 50) "Foo" 33 IDENT@[47; 50) "Foo"
34 POS_FIELD_DEF_LIST@[50; 65) 34 TUPLE_FIELD_DEF_LIST@[50; 65)
35 L_PAREN@[50; 51) "(" 35 L_PAREN@[50; 51) "("
36 POS_FIELD_DEF@[51; 57) 36 TUPLE_FIELD_DEF@[51; 57)
37 PATH_TYPE@[51; 57) 37 PATH_TYPE@[51; 57)
38 PATH@[51; 57) 38 PATH@[51; 57)
39 PATH_SEGMENT@[51; 57) 39 PATH_SEGMENT@[51; 57)
@@ -41,7 +41,7 @@ SOURCE_FILE@[0; 106)
41 IDENT@[51; 57) "String" 41 IDENT@[51; 57) "String"
42 COMMA@[57; 58) "," 42 COMMA@[57; 58) ","
43 WHITESPACE@[58; 59) " " 43 WHITESPACE@[58; 59) " "
44 POS_FIELD_DEF@[59; 64) 44 TUPLE_FIELD_DEF@[59; 64)
45 PATH_TYPE@[59; 64) 45 PATH_TYPE@[59; 64)
46 PATH@[59; 64) 46 PATH@[59; 64)
47 PATH_SEGMENT@[59; 64) 47 PATH_SEGMENT@[59; 64)
@@ -56,10 +56,10 @@ SOURCE_FILE@[0; 106)
56 NAME@[74; 77) 56 NAME@[74; 77)
57 IDENT@[74; 77) "Foo" 57 IDENT@[74; 77) "Foo"
58 WHITESPACE@[77; 78) " " 58 WHITESPACE@[77; 78) " "
59 NAMED_FIELD_DEF_LIST@[78; 105) 59 RECORD_FIELD_DEF_LIST@[78; 105)
60 L_CURLY@[78; 79) "{" 60 L_CURLY@[78; 79) "{"
61 WHITESPACE@[79; 84) "\n " 61 WHITESPACE@[79; 84) "\n "
62 NAMED_FIELD_DEF@[84; 90) 62 RECORD_FIELD_DEF@[84; 90)
63 NAME@[84; 85) 63 NAME@[84; 85)
64 IDENT@[84; 85) "a" 64 IDENT@[84; 85) "a"
65 COLON@[85; 86) ":" 65 COLON@[85; 86) ":"
@@ -71,7 +71,7 @@ SOURCE_FILE@[0; 106)
71 IDENT@[87; 90) "i32" 71 IDENT@[87; 90) "i32"
72 COMMA@[90; 91) "," 72 COMMA@[90; 91) ","
73 WHITESPACE@[91; 96) "\n " 73 WHITESPACE@[91; 96) "\n "
74 NAMED_FIELD_DEF@[96; 102) 74 RECORD_FIELD_DEF@[96; 102)
75 NAME@[96; 97) 75 NAME@[96; 97)
76 IDENT@[96; 97) "b" 76 IDENT@[96; 97) "b"
77 COLON@[97; 98) ":" 77 COLON@[97; 98) ":"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0102_field_pat_list.rs b/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rs
index da3412fa8..da3412fa8 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0102_field_pat_list.rs
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rs
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0102_field_pat_list.txt b/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.txt
index a2af4fc60..22db72c12 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0102_field_pat_list.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.txt
@@ -14,13 +14,13 @@ SOURCE_FILE@[0; 119)
14 LET_STMT@[15; 29) 14 LET_STMT@[15; 29)
15 LET_KW@[15; 18) "let" 15 LET_KW@[15; 18) "let"
16 WHITESPACE@[18; 19) " " 16 WHITESPACE@[18; 19) " "
17 STRUCT_PAT@[19; 23) 17 RECORD_PAT@[19; 23)
18 PATH@[19; 20) 18 PATH@[19; 20)
19 PATH_SEGMENT@[19; 20) 19 PATH_SEGMENT@[19; 20)
20 NAME_REF@[19; 20) 20 NAME_REF@[19; 20)
21 IDENT@[19; 20) "S" 21 IDENT@[19; 20) "S"
22 WHITESPACE@[20; 21) " " 22 WHITESPACE@[20; 21) " "
23 FIELD_PAT_LIST@[21; 23) 23 RECORD_FIELD_PAT_LIST@[21; 23)
24 L_CURLY@[21; 22) "{" 24 L_CURLY@[21; 22) "{"
25 R_CURLY@[22; 23) "}" 25 R_CURLY@[22; 23) "}"
26 WHITESPACE@[23; 24) " " 26 WHITESPACE@[23; 24) " "
@@ -34,13 +34,13 @@ SOURCE_FILE@[0; 119)
34 LET_STMT@[34; 62) 34 LET_STMT@[34; 62)
35 LET_KW@[34; 37) "let" 35 LET_KW@[34; 37) "let"
36 WHITESPACE@[37; 38) " " 36 WHITESPACE@[37; 38) " "
37 STRUCT_PAT@[38; 56) 37 RECORD_PAT@[38; 56)
38 PATH@[38; 39) 38 PATH@[38; 39)
39 PATH_SEGMENT@[38; 39) 39 PATH_SEGMENT@[38; 39)
40 NAME_REF@[38; 39) 40 NAME_REF@[38; 39)
41 IDENT@[38; 39) "S" 41 IDENT@[38; 39) "S"
42 WHITESPACE@[39; 40) " " 42 WHITESPACE@[39; 40) " "
43 FIELD_PAT_LIST@[40; 56) 43 RECORD_FIELD_PAT_LIST@[40; 56)
44 L_CURLY@[40; 41) "{" 44 L_CURLY@[40; 41) "{"
45 WHITESPACE@[41; 42) " " 45 WHITESPACE@[41; 42) " "
46 BIND_PAT@[42; 43) 46 BIND_PAT@[42; 43)
@@ -68,16 +68,16 @@ SOURCE_FILE@[0; 119)
68 LET_STMT@[67; 90) 68 LET_STMT@[67; 90)
69 LET_KW@[67; 70) "let" 69 LET_KW@[67; 70) "let"
70 WHITESPACE@[70; 71) " " 70 WHITESPACE@[70; 71) " "
71 STRUCT_PAT@[71; 84) 71 RECORD_PAT@[71; 84)
72 PATH@[71; 72) 72 PATH@[71; 72)
73 PATH_SEGMENT@[71; 72) 73 PATH_SEGMENT@[71; 72)
74 NAME_REF@[71; 72) 74 NAME_REF@[71; 72)
75 IDENT@[71; 72) "S" 75 IDENT@[71; 72) "S"
76 WHITESPACE@[72; 73) " " 76 WHITESPACE@[72; 73) " "
77 FIELD_PAT_LIST@[73; 84) 77 RECORD_FIELD_PAT_LIST@[73; 84)
78 L_CURLY@[73; 74) "{" 78 L_CURLY@[73; 74) "{"
79 WHITESPACE@[74; 75) " " 79 WHITESPACE@[74; 75) " "
80 FIELD_PAT@[75; 79) 80 RECORD_FIELD_PAT@[75; 79)
81 NAME@[75; 76) 81 NAME@[75; 76)
82 IDENT@[75; 76) "h" 82 IDENT@[75; 76) "h"
83 COLON@[76; 77) ":" 83 COLON@[76; 77) ":"
@@ -99,16 +99,16 @@ SOURCE_FILE@[0; 119)
99 LET_STMT@[95; 116) 99 LET_STMT@[95; 116)
100 LET_KW@[95; 98) "let" 100 LET_KW@[95; 98) "let"
101 WHITESPACE@[98; 99) " " 101 WHITESPACE@[98; 99) " "
102 STRUCT_PAT@[99; 110) 102 RECORD_PAT@[99; 110)
103 PATH@[99; 100) 103 PATH@[99; 100)
104 PATH_SEGMENT@[99; 100) 104 PATH_SEGMENT@[99; 100)
105 NAME_REF@[99; 100) 105 NAME_REF@[99; 100)
106 IDENT@[99; 100) "S" 106 IDENT@[99; 100) "S"
107 WHITESPACE@[100; 101) " " 107 WHITESPACE@[100; 101) " "
108 FIELD_PAT_LIST@[101; 110) 108 RECORD_FIELD_PAT_LIST@[101; 110)
109 L_CURLY@[101; 102) "{" 109 L_CURLY@[101; 102) "{"
110 WHITESPACE@[102; 103) " " 110 WHITESPACE@[102; 103) " "
111 FIELD_PAT@[103; 107) 111 RECORD_FIELD_PAT@[103; 107)
112 NAME@[103; 104) 112 NAME@[103; 104)
113 IDENT@[103; 104) "h" 113 IDENT@[103; 104) "h"
114 COLON@[104; 105) ":" 114 COLON@[104; 105) ":"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.txt b/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.txt
index 8534592b9..f5de01405 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.txt
@@ -10,9 +10,9 @@ SOURCE_FILE@[0; 53)
10 NAME@[12; 13) 10 NAME@[12; 13)
11 IDENT@[12; 13) "T" 11 IDENT@[12; 13) "T"
12 R_ANGLE@[13; 14) ">" 12 R_ANGLE@[13; 14) ">"
13 POS_FIELD_DEF_LIST@[14; 17) 13 TUPLE_FIELD_DEF_LIST@[14; 17)
14 L_PAREN@[14; 15) "(" 14 L_PAREN@[14; 15) "("
15 POS_FIELD_DEF@[15; 16) 15 TUPLE_FIELD_DEF@[15; 16)
16 PATH_TYPE@[15; 16) 16 PATH_TYPE@[15; 16)
17 PATH@[15; 16) 17 PATH@[15; 16)
18 PATH_SEGMENT@[15; 16) 18 PATH_SEGMENT@[15; 16)
@@ -51,9 +51,9 @@ SOURCE_FILE@[0; 53)
51 NAME@[46; 47) 51 NAME@[46; 47)
52 IDENT@[46; 47) "T" 52 IDENT@[46; 47) "T"
53 R_ANGLE@[47; 48) ">" 53 R_ANGLE@[47; 48) ">"
54 POS_FIELD_DEF_LIST@[48; 51) 54 TUPLE_FIELD_DEF_LIST@[48; 51)
55 L_PAREN@[48; 49) "(" 55 L_PAREN@[48; 49) "("
56 POS_FIELD_DEF@[49; 50) 56 TUPLE_FIELD_DEF@[49; 50)
57 PATH_TYPE@[49; 50) 57 PATH_TYPE@[49; 50)
58 PATH@[49; 50) 58 PATH@[49; 50)
59 PATH_SEGMENT@[49; 50) 59 PATH_SEGMENT@[49; 50)
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0115_pos_field_attrs.rs b/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rs
index 635b9ac21..635b9ac21 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0115_pos_field_attrs.rs
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rs
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0115_pos_field_attrs.txt b/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.txt
index 6dd3a9b93..cb6d9f76d 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0115_pos_field_attrs.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.txt
@@ -5,10 +5,10 @@ SOURCE_FILE@[0; 60)
5 NAME@[7; 8) 5 NAME@[7; 8)
6 IDENT@[7; 8) "S" 6 IDENT@[7; 8) "S"
7 WHITESPACE@[8; 9) " " 7 WHITESPACE@[8; 9) " "
8 POS_FIELD_DEF_LIST@[9; 58) 8 TUPLE_FIELD_DEF_LIST@[9; 58)
9 L_PAREN@[9; 10) "(" 9 L_PAREN@[9; 10) "("
10 WHITESPACE@[10; 15) "\n " 10 WHITESPACE@[10; 15) "\n "
11 POS_FIELD_DEF@[15; 55) 11 TUPLE_FIELD_DEF@[15; 55)
12 ATTR@[15; 43) 12 ATTR@[15; 43)
13 POUND@[15; 16) "#" 13 POUND@[15; 16) "#"
14 TOKEN_TREE@[16; 43) 14 TOKEN_TREE@[16; 43)
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0125_struct_literal_field_with_attr.rs b/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rs
index a6c7760c7..a6c7760c7 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0125_struct_literal_field_with_attr.rs
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rs
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0125_struct_literal_field_with_attr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.txt
index f9c5ec124..8fdf3756f 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0125_struct_literal_field_with_attr.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.txt
@@ -11,16 +11,16 @@ SOURCE_FILE@[0; 46)
11 BLOCK@[10; 45) 11 BLOCK@[10; 45)
12 L_CURLY@[10; 11) "{" 12 L_CURLY@[10; 11) "{"
13 WHITESPACE@[11; 16) "\n " 13 WHITESPACE@[11; 16) "\n "
14 STRUCT_LIT@[16; 43) 14 RECORD_LIT@[16; 43)
15 PATH@[16; 17) 15 PATH@[16; 17)
16 PATH_SEGMENT@[16; 17) 16 PATH_SEGMENT@[16; 17)
17 NAME_REF@[16; 17) 17 NAME_REF@[16; 17)
18 IDENT@[16; 17) "S" 18 IDENT@[16; 17) "S"
19 WHITESPACE@[17; 18) " " 19 WHITESPACE@[17; 18) " "
20 NAMED_FIELD_LIST@[18; 43) 20 RECORD_FIELD_LIST@[18; 43)
21 L_CURLY@[18; 19) "{" 21 L_CURLY@[18; 19) "{"
22 WHITESPACE@[19; 20) " " 22 WHITESPACE@[19; 20) " "
23 NAMED_FIELD@[20; 41) 23 RECORD_FIELD@[20; 41)
24 ATTR@[20; 32) 24 ATTR@[20; 32)
25 POUND@[20; 21) "#" 25 POUND@[20; 21) "#"
26 TOKEN_TREE@[21; 32) 26 TOKEN_TREE@[21; 32)
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.txt b/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.txt
index 50d3b5def..64cbf4632 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.txt
@@ -53,7 +53,7 @@ SOURCE_FILE@[0; 111)
53 NAME@[103; 104) 53 NAME@[103; 104)
54 IDENT@[103; 104) "S" 54 IDENT@[103; 104) "S"
55 WHITESPACE@[104; 105) " " 55 WHITESPACE@[104; 105) " "
56 NAMED_FIELD_DEF_LIST@[105; 107) 56 RECORD_FIELD_DEF_LIST@[105; 107)
57 L_CURLY@[105; 106) "{" 57 L_CURLY@[105; 106) "{"
58 R_CURLY@[106; 107) "}" 58 R_CURLY@[106; 107) "}"
59 SEMI@[107; 108) ";" 59 SEMI@[107; 108) ";"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.txt b/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.txt
index 08128f365..c4db9da40 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.txt
@@ -22,14 +22,14 @@ SOURCE_FILE@[0; 52)
22 WHITESPACE@[23; 24) " " 22 WHITESPACE@[23; 24) " "
23 EQ@[24; 25) "=" 23 EQ@[24; 25) "="
24 WHITESPACE@[25; 26) " " 24 WHITESPACE@[25; 26) " "
25 STRUCT_LIT@[26; 33) 25 RECORD_LIT@[26; 33)
26 PATH@[26; 27) 26 PATH@[26; 27)
27 PATH_SEGMENT@[26; 27) 27 PATH_SEGMENT@[26; 27)
28 NAME_REF@[26; 27) 28 NAME_REF@[26; 27)
29 IDENT@[26; 27) "F" 29 IDENT@[26; 27) "F"
30 NAMED_FIELD_LIST@[27; 33) 30 RECORD_FIELD_LIST@[27; 33)
31 L_CURLY@[27; 28) "{" 31 L_CURLY@[27; 28) "{"
32 NAMED_FIELD@[28; 32) 32 RECORD_FIELD@[28; 32)
33 NAME_REF@[28; 29) 33 NAME_REF@[28; 29)
34 IDENT@[28; 29) "x" 34 IDENT@[28; 29) "x"
35 COLON@[29; 30) ":" 35 COLON@[29; 30) ":"
diff --git a/crates/ra_syntax/test_data/parser/ok/0001_struct_item.txt b/crates/ra_syntax/test_data/parser/ok/0001_struct_item.txt
index c6653cf25..fdc2d6768 100644
--- a/crates/ra_syntax/test_data/parser/ok/0001_struct_item.txt
+++ b/crates/ra_syntax/test_data/parser/ok/0001_struct_item.txt
@@ -20,10 +20,10 @@ SOURCE_FILE@[0; 32)
20 IDENT@[12; 16) "Copy" 20 IDENT@[12; 16) "Copy"
21 R_ANGLE@[16; 17) ">" 21 R_ANGLE@[16; 17) ">"
22 WHITESPACE@[17; 18) " " 22 WHITESPACE@[17; 18) " "
23 NAMED_FIELD_DEF_LIST@[18; 31) 23 RECORD_FIELD_DEF_LIST@[18; 31)
24 L_CURLY@[18; 19) "{" 24 L_CURLY@[18; 19) "{"
25 WHITESPACE@[19; 24) "\n " 25 WHITESPACE@[19; 24) "\n "
26 NAMED_FIELD_DEF@[24; 28) 26 RECORD_FIELD_DEF@[24; 28)
27 NAME@[24; 25) 27 NAME@[24; 25)
28 IDENT@[24; 25) "f" 28 IDENT@[24; 25) "f"
29 COLON@[25; 26) ":" 29 COLON@[25; 26) ":"
diff --git a/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.txt b/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.txt
index d0565ea83..ef34702fd 100644
--- a/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.txt
+++ b/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.txt
@@ -5,10 +5,10 @@ SOURCE_FILE@[0; 25)
5 NAME@[7; 8) 5 NAME@[7; 8)
6 IDENT@[7; 8) "S" 6 IDENT@[7; 8) "S"
7 WHITESPACE@[8; 9) " " 7 WHITESPACE@[8; 9) " "
8 NAMED_FIELD_DEF_LIST@[9; 25) 8 RECORD_FIELD_DEF_LIST@[9; 25)
9 L_CURLY@[9; 10) "{" 9 L_CURLY@[9; 10) "{"
10 WHITESPACE@[10; 15) "\n " 10 WHITESPACE@[10; 15) "\n "
11 NAMED_FIELD_DEF@[15; 23) 11 RECORD_FIELD_DEF@[15; 23)
12 NAME@[15; 18) 12 NAME@[15; 18)
13 IDENT@[15; 18) "foo" 13 IDENT@[15; 18) "foo"
14 COLON@[18; 19) ":" 14 COLON@[18; 19) ":"
diff --git a/crates/ra_syntax/test_data/parser/ok/0008_mod_item.txt b/crates/ra_syntax/test_data/parser/ok/0008_mod_item.txt
index 9152d6eb6..5c16d0be6 100644
--- a/crates/ra_syntax/test_data/parser/ok/0008_mod_item.txt
+++ b/crates/ra_syntax/test_data/parser/ok/0008_mod_item.txt
@@ -46,7 +46,7 @@ SOURCE_FILE@[0; 118)
46 NAME@[59; 60) 46 NAME@[59; 60)
47 IDENT@[59; 60) "S" 47 IDENT@[59; 60) "S"
48 WHITESPACE@[60; 61) " " 48 WHITESPACE@[60; 61) " "
49 NAMED_FIELD_DEF_LIST@[61; 63) 49 RECORD_FIELD_DEF_LIST@[61; 63)
50 L_CURLY@[61; 62) "{" 50 L_CURLY@[61; 62) "{"
51 R_CURLY@[62; 63) "}" 51 R_CURLY@[62; 63) "}"
52 WHITESPACE@[63; 64) "\n" 52 WHITESPACE@[63; 64) "\n"
diff --git a/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.txt b/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.txt
index ac44093e8..3fbd14d7b 100644
--- a/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.txt
+++ b/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.txt
@@ -12,7 +12,7 @@ SOURCE_FILE@[0; 97)
12 NAME@[17; 18) 12 NAME@[17; 18)
13 IDENT@[17; 18) "B" 13 IDENT@[17; 18) "B"
14 WHITESPACE@[18; 19) " " 14 WHITESPACE@[18; 19) " "
15 NAMED_FIELD_DEF_LIST@[19; 21) 15 RECORD_FIELD_DEF_LIST@[19; 21)
16 L_CURLY@[19; 20) "{" 16 L_CURLY@[19; 20) "{"
17 R_CURLY@[20; 21) "}" 17 R_CURLY@[20; 21) "}"
18 WHITESPACE@[21; 22) "\n" 18 WHITESPACE@[21; 22) "\n"
@@ -21,7 +21,7 @@ SOURCE_FILE@[0; 97)
21 WHITESPACE@[28; 29) " " 21 WHITESPACE@[28; 29) " "
22 NAME@[29; 30) 22 NAME@[29; 30)
23 IDENT@[29; 30) "C" 23 IDENT@[29; 30) "C"
24 POS_FIELD_DEF_LIST@[30; 32) 24 TUPLE_FIELD_DEF_LIST@[30; 32)
25 L_PAREN@[30; 31) "(" 25 L_PAREN@[30; 31) "("
26 R_PAREN@[31; 32) ")" 26 R_PAREN@[31; 32) ")"
27 SEMI@[32; 33) ";" 27 SEMI@[32; 33) ";"
@@ -32,10 +32,10 @@ SOURCE_FILE@[0; 97)
32 NAME@[42; 43) 32 NAME@[42; 43)
33 IDENT@[42; 43) "D" 33 IDENT@[42; 43) "D"
34 WHITESPACE@[43; 44) " " 34 WHITESPACE@[43; 44) " "
35 NAMED_FIELD_DEF_LIST@[44; 74) 35 RECORD_FIELD_DEF_LIST@[44; 74)
36 L_CURLY@[44; 45) "{" 36 L_CURLY@[44; 45) "{"
37 WHITESPACE@[45; 50) "\n " 37 WHITESPACE@[45; 50) "\n "
38 NAMED_FIELD_DEF@[50; 56) 38 RECORD_FIELD_DEF@[50; 56)
39 NAME@[50; 51) 39 NAME@[50; 51)
40 IDENT@[50; 51) "a" 40 IDENT@[50; 51) "a"
41 COLON@[51; 52) ":" 41 COLON@[51; 52) ":"
@@ -47,7 +47,7 @@ SOURCE_FILE@[0; 97)
47 IDENT@[53; 56) "u32" 47 IDENT@[53; 56) "u32"
48 COMMA@[56; 57) "," 48 COMMA@[56; 57) ","
49 WHITESPACE@[57; 62) "\n " 49 WHITESPACE@[57; 62) "\n "
50 NAMED_FIELD_DEF@[62; 72) 50 RECORD_FIELD_DEF@[62; 72)
51 VISIBILITY@[62; 65) 51 VISIBILITY@[62; 65)
52 PUB_KW@[62; 65) "pub" 52 PUB_KW@[62; 65) "pub"
53 WHITESPACE@[65; 66) " " 53 WHITESPACE@[65; 66) " "
@@ -68,9 +68,9 @@ SOURCE_FILE@[0; 97)
68 WHITESPACE@[82; 83) " " 68 WHITESPACE@[82; 83) " "
69 NAME@[83; 84) 69 NAME@[83; 84)
70 IDENT@[83; 84) "E" 70 IDENT@[83; 84) "E"
71 POS_FIELD_DEF_LIST@[84; 95) 71 TUPLE_FIELD_DEF_LIST@[84; 95)
72 L_PAREN@[84; 85) "(" 72 L_PAREN@[84; 85) "("
73 POS_FIELD_DEF@[85; 90) 73 TUPLE_FIELD_DEF@[85; 90)
74 VISIBILITY@[85; 88) 74 VISIBILITY@[85; 88)
75 PUB_KW@[85; 88) "pub" 75 PUB_KW@[85; 88) "pub"
76 WHITESPACE@[88; 89) " " 76 WHITESPACE@[88; 89) " "
@@ -81,7 +81,7 @@ SOURCE_FILE@[0; 97)
81 IDENT@[89; 90) "x" 81 IDENT@[89; 90) "x"
82 COMMA@[90; 91) "," 82 COMMA@[90; 91) ","
83 WHITESPACE@[91; 92) " " 83 WHITESPACE@[91; 92) " "
84 POS_FIELD_DEF@[92; 93) 84 TUPLE_FIELD_DEF@[92; 93)
85 PATH_TYPE@[92; 93) 85 PATH_TYPE@[92; 93)
86 PATH@[92; 93) 86 PATH@[92; 93)
87 PATH_SEGMENT@[92; 93) 87 PATH_SEGMENT@[92; 93)
diff --git a/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.txt b/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.txt
index 3f06f20f9..1e4e58dd3 100644
--- a/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.txt
+++ b/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.txt
@@ -23,9 +23,9 @@ SOURCE_FILE@[0; 290)
23 NAME@[24; 25) 23 NAME@[24; 25)
24 IDENT@[24; 25) "T" 24 IDENT@[24; 25) "T"
25 R_ANGLE@[25; 26) ">" 25 R_ANGLE@[25; 26) ">"
26 POS_FIELD_DEF_LIST@[26; 31) 26 TUPLE_FIELD_DEF_LIST@[26; 31)
27 L_PAREN@[26; 27) "(" 27 L_PAREN@[26; 27) "("
28 POS_FIELD_DEF@[27; 30) 28 TUPLE_FIELD_DEF@[27; 30)
29 PATH_TYPE@[27; 30) 29 PATH_TYPE@[27; 30)
30 PATH@[27; 30) 30 PATH@[27; 30)
31 PATH_SEGMENT@[27; 30) 31 PATH_SEGMENT@[27; 30)
@@ -46,10 +46,10 @@ SOURCE_FILE@[0; 290)
46 IDENT@[43; 44) "T" 46 IDENT@[43; 44) "T"
47 R_ANGLE@[44; 45) ">" 47 R_ANGLE@[44; 45) ">"
48 WHITESPACE@[45; 46) " " 48 WHITESPACE@[45; 46) " "
49 NAMED_FIELD_DEF_LIST@[46; 56) 49 RECORD_FIELD_DEF_LIST@[46; 56)
50 L_CURLY@[46; 47) "{" 50 L_CURLY@[46; 47) "{"
51 WHITESPACE@[47; 48) " " 51 WHITESPACE@[47; 48) " "
52 NAMED_FIELD_DEF@[48; 54) 52 RECORD_FIELD_DEF@[48; 54)
53 NAME@[48; 49) 53 NAME@[48; 49)
54 IDENT@[48; 49) "u" 54 IDENT@[48; 49) "u"
55 COLON@[49; 50) ":" 55 COLON@[49; 50) ":"
diff --git a/crates/ra_syntax/test_data/parser/ok/0019_enums.txt b/crates/ra_syntax/test_data/parser/ok/0019_enums.txt
index 37753a7d0..9d4a47a51 100644
--- a/crates/ra_syntax/test_data/parser/ok/0019_enums.txt
+++ b/crates/ra_syntax/test_data/parser/ok/0019_enums.txt
@@ -86,10 +86,10 @@ SOURCE_FILE@[0; 182)
86 NAME@[101; 102) 86 NAME@[101; 102)
87 IDENT@[101; 102) "C" 87 IDENT@[101; 102) "C"
88 WHITESPACE@[102; 103) " " 88 WHITESPACE@[102; 103) " "
89 NAMED_FIELD_DEF_LIST@[103; 146) 89 RECORD_FIELD_DEF_LIST@[103; 146)
90 L_CURLY@[103; 104) "{" 90 L_CURLY@[103; 104) "{"
91 WHITESPACE@[104; 113) "\n " 91 WHITESPACE@[104; 113) "\n "
92 NAMED_FIELD_DEF@[113; 119) 92 RECORD_FIELD_DEF@[113; 119)
93 NAME@[113; 114) 93 NAME@[113; 114)
94 IDENT@[113; 114) "a" 94 IDENT@[113; 114) "a"
95 COLON@[114; 115) ":" 95 COLON@[114; 115) ":"
@@ -101,7 +101,7 @@ SOURCE_FILE@[0; 182)
101 IDENT@[116; 119) "u32" 101 IDENT@[116; 119) "u32"
102 COMMA@[119; 120) "," 102 COMMA@[119; 120) ","
103 WHITESPACE@[120; 129) "\n " 103 WHITESPACE@[120; 129) "\n "
104 NAMED_FIELD_DEF@[129; 139) 104 RECORD_FIELD_DEF@[129; 139)
105 VISIBILITY@[129; 132) 105 VISIBILITY@[129; 132)
106 PUB_KW@[129; 132) "pub" 106 PUB_KW@[129; 132) "pub"
107 WHITESPACE@[132; 133) " " 107 WHITESPACE@[132; 133) " "
@@ -123,7 +123,7 @@ SOURCE_FILE@[0; 182)
123 NAME@[152; 153) 123 NAME@[152; 153)
124 IDENT@[152; 153) "F" 124 IDENT@[152; 153) "F"
125 WHITESPACE@[153; 154) " " 125 WHITESPACE@[153; 154) " "
126 NAMED_FIELD_DEF_LIST@[154; 156) 126 RECORD_FIELD_DEF_LIST@[154; 156)
127 L_CURLY@[154; 155) "{" 127 L_CURLY@[154; 155) "{"
128 R_CURLY@[155; 156) "}" 128 R_CURLY@[155; 156) "}"
129 COMMA@[156; 157) "," 129 COMMA@[156; 157) ","
@@ -131,9 +131,9 @@ SOURCE_FILE@[0; 182)
131 ENUM_VARIANT@[162; 169) 131 ENUM_VARIANT@[162; 169)
132 NAME@[162; 163) 132 NAME@[162; 163)
133 IDENT@[162; 163) "D" 133 IDENT@[162; 163) "D"
134 POS_FIELD_DEF_LIST@[163; 169) 134 TUPLE_FIELD_DEF_LIST@[163; 169)
135 L_PAREN@[163; 164) "(" 135 L_PAREN@[163; 164) "("
136 POS_FIELD_DEF@[164; 167) 136 TUPLE_FIELD_DEF@[164; 167)
137 PATH_TYPE@[164; 167) 137 PATH_TYPE@[164; 167)
138 PATH@[164; 167) 138 PATH@[164; 167)
139 PATH_SEGMENT@[164; 167) 139 PATH_SEGMENT@[164; 167)
@@ -146,7 +146,7 @@ SOURCE_FILE@[0; 182)
146 ENUM_VARIANT@[175; 178) 146 ENUM_VARIANT@[175; 178)
147 NAME@[175; 176) 147 NAME@[175; 176)
148 IDENT@[175; 176) "E" 148 IDENT@[175; 176) "E"
149 POS_FIELD_DEF_LIST@[176; 178) 149 TUPLE_FIELD_DEF_LIST@[176; 178)
150 L_PAREN@[176; 177) "(" 150 L_PAREN@[176; 177) "("
151 R_PAREN@[177; 178) ")" 151 R_PAREN@[177; 178) ")"
152 COMMA@[178; 179) "," 152 COMMA@[178; 179) ","
diff --git a/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt
index c89b591e9..c13ebfe37 100644
--- a/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt
+++ b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.txt
@@ -1564,10 +1564,10 @@ SOURCE_FILE@[0; 3813)
1564 LIFETIME@[2863; 2869) "\'union" 1564 LIFETIME@[2863; 2869) "\'union"
1565 R_ANGLE@[2869; 2870) ">" 1565 R_ANGLE@[2869; 2870) ">"
1566 WHITESPACE@[2870; 2871) " " 1566 WHITESPACE@[2870; 2871) " "
1567 NAMED_FIELD_DEF_LIST@[2871; 2904) 1567 RECORD_FIELD_DEF_LIST@[2871; 2904)
1568 L_CURLY@[2871; 2872) "{" 1568 L_CURLY@[2871; 2872) "{"
1569 WHITESPACE@[2872; 2873) " " 1569 WHITESPACE@[2872; 2873) " "
1570 NAMED_FIELD_DEF@[2873; 2901) 1570 RECORD_FIELD_DEF@[2873; 2901)
1571 NAME@[2873; 2878) 1571 NAME@[2873; 2878)
1572 IDENT@[2873; 2878) "union" 1572 IDENT@[2873; 2878) "union"
1573 COLON@[2878; 2879) ":" 1573 COLON@[2878; 2879) ":"
diff --git a/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.txt b/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.txt
index 3c717555d..05f2c656f 100644
--- a/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.txt
+++ b/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.txt
@@ -5,10 +5,10 @@ SOURCE_FILE@[0; 27)
5 NAME@[7; 8) 5 NAME@[7; 8)
6 IDENT@[7; 8) "S" 6 IDENT@[7; 8) "S"
7 WHITESPACE@[8; 9) " " 7 WHITESPACE@[8; 9) " "
8 NAMED_FIELD_DEF_LIST@[9; 27) 8 RECORD_FIELD_DEF_LIST@[9; 27)
9 L_CURLY@[9; 10) "{" 9 L_CURLY@[9; 10) "{"
10 WHITESPACE@[10; 15) "\n " 10 WHITESPACE@[10; 15) "\n "
11 NAMED_FIELD_DEF@[15; 25) 11 RECORD_FIELD_DEF@[15; 25)
12 NAME@[15; 20) 12 NAME@[15; 20)
13 IDENT@[15; 20) "r#foo" 13 IDENT@[15; 20) "r#foo"
14 COLON@[20; 21) ":" 14 COLON@[20; 21) ":"
diff --git a/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.txt b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.txt
index ef47521bf..1f2456afa 100644
--- a/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.txt
+++ b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.txt
@@ -7,10 +7,10 @@ SOURCE_FILE@[0; 160)
7 NAME@[69; 73) 7 NAME@[69; 73)
8 IDENT@[69; 73) "Repr" 8 IDENT@[69; 73) "Repr"
9 WHITESPACE@[73; 74) " " 9 WHITESPACE@[73; 74) " "
10 NAMED_FIELD_DEF_LIST@[74; 90) 10 RECORD_FIELD_DEF_LIST@[74; 90)
11 L_CURLY@[74; 75) "{" 11 L_CURLY@[74; 75) "{"
12 WHITESPACE@[75; 76) " " 12 WHITESPACE@[75; 76) " "
13 NAMED_FIELD_DEF@[76; 88) 13 RECORD_FIELD_DEF@[76; 88)
14 NAME@[76; 79) 14 NAME@[76; 79)
15 IDENT@[76; 79) "raw" 15 IDENT@[76; 79) "raw"
16 COLON@[79; 80) ":" 16 COLON@[79; 80) ":"
@@ -46,16 +46,16 @@ SOURCE_FILE@[0; 160)
46 BIN_EXPR@[107; 135) 46 BIN_EXPR@[107; 135)
47 INDEX_EXPR@[107; 131) 47 INDEX_EXPR@[107; 131)
48 FIELD_EXPR@[107; 128) 48 FIELD_EXPR@[107; 128)
49 STRUCT_LIT@[107; 124) 49 RECORD_LIT@[107; 124)
50 PATH@[107; 111) 50 PATH@[107; 111)
51 PATH_SEGMENT@[107; 111) 51 PATH_SEGMENT@[107; 111)
52 NAME_REF@[107; 111) 52 NAME_REF@[107; 111)
53 IDENT@[107; 111) "Repr" 53 IDENT@[107; 111) "Repr"
54 WHITESPACE@[111; 112) " " 54 WHITESPACE@[111; 112) " "
55 NAMED_FIELD_LIST@[112; 124) 55 RECORD_FIELD_LIST@[112; 124)
56 L_CURLY@[112; 113) "{" 56 L_CURLY@[112; 113) "{"
57 WHITESPACE@[113; 114) " " 57 WHITESPACE@[113; 114) " "
58 NAMED_FIELD@[114; 122) 58 RECORD_FIELD@[114; 122)
59 NAME_REF@[114; 117) 59 NAME_REF@[114; 117)
60 IDENT@[114; 117) "raw" 60 IDENT@[114; 117) "raw"
61 COLON@[117; 118) ":" 61 COLON@[117; 118) ":"
@@ -83,14 +83,14 @@ SOURCE_FILE@[0; 160)
83 WHITESPACE@[136; 141) "\n " 83 WHITESPACE@[136; 141) "\n "
84 EXPR_STMT@[141; 157) 84 EXPR_STMT@[141; 157)
85 CALL_EXPR@[141; 156) 85 CALL_EXPR@[141; 156)
86 STRUCT_LIT@[141; 154) 86 RECORD_LIT@[141; 154)
87 PATH@[141; 145) 87 PATH@[141; 145)
88 PATH_SEGMENT@[141; 145) 88 PATH_SEGMENT@[141; 145)
89 NAME_REF@[141; 145) 89 NAME_REF@[141; 145)
90 IDENT@[141; 145) "Repr" 90 IDENT@[141; 145) "Repr"
91 NAMED_FIELD_LIST@[145; 154) 91 RECORD_FIELD_LIST@[145; 154)
92 L_CURLY@[145; 146) "{" 92 L_CURLY@[145; 146) "{"
93 NAMED_FIELD@[146; 153) 93 RECORD_FIELD@[146; 153)
94 NAME_REF@[146; 149) 94 NAME_REF@[146; 149)
95 IDENT@[146; 149) "raw" 95 IDENT@[146; 149) "raw"
96 COLON@[149; 150) ":" 96 COLON@[149; 150) ":"
diff --git a/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.txt b/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.txt
index 917b50ddf..136e2aae1 100644
--- a/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.txt
+++ b/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.txt
@@ -268,9 +268,9 @@ SOURCE_FILE@[0; 395)
268 ENUM_VARIANT@[356; 365) 268 ENUM_VARIANT@[356; 365)
269 NAME@[356; 357) 269 NAME@[356; 357)
270 IDENT@[356; 357) "B" 270 IDENT@[356; 357) "B"
271 POS_FIELD_DEF_LIST@[357; 365) 271 TUPLE_FIELD_DEF_LIST@[357; 365)
272 L_PAREN@[357; 358) "(" 272 L_PAREN@[357; 358) "("
273 POS_FIELD_DEF@[358; 360) 273 TUPLE_FIELD_DEF@[358; 360)
274 PATH_TYPE@[358; 360) 274 PATH_TYPE@[358; 360)
275 PATH@[358; 360) 275 PATH@[358; 360)
276 PATH_SEGMENT@[358; 360) 276 PATH_SEGMENT@[358; 360)
@@ -278,7 +278,7 @@ SOURCE_FILE@[0; 395)
278 IDENT@[358; 360) "i8" 278 IDENT@[358; 360) "i8"
279 COMMA@[360; 361) "," 279 COMMA@[360; 361) ","
280 WHITESPACE@[361; 362) " " 280 WHITESPACE@[361; 362) " "
281 POS_FIELD_DEF@[362; 364) 281 TUPLE_FIELD_DEF@[362; 364)
282 PATH_TYPE@[362; 364) 282 PATH_TYPE@[362; 364)
283 PATH@[362; 364) 283 PATH@[362; 364)
284 PATH_SEGMENT@[362; 364) 284 PATH_SEGMENT@[362; 364)