diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-30 15:49:39 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-30 15:49:39 +0100 |
commit | a257fd06b36d2e7310e5e38823f6636343a37331 (patch) | |
tree | e360ad1f518319883677364f49d75d5c508aafcd /crates/ra_syntax | |
parent | 282702c2877e3f9002308b1b63fc472b5e799c56 (diff) | |
parent | 0a9e3ccc262fbcbd4cdaab30384f8cb71584544b (diff) |
Merge #5597
5597: Rename FieldDef -> Field r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax')
30 files changed, 139 insertions, 143 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 9f9c06e50..46d73215c 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -165,7 +165,7 @@ impl ast::GenericParamsOwner for StructDef {} | |||
165 | impl StructDef { | 165 | impl StructDef { |
166 | pub fn struct_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![struct]) } | 166 | pub fn struct_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![struct]) } |
167 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } | 167 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } |
168 | pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) } | 168 | pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) } |
169 | } | 169 | } |
170 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 170 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
171 | pub struct TraitDef { | 171 | pub struct TraitDef { |
@@ -208,9 +208,7 @@ impl ast::VisibilityOwner for UnionDef {} | |||
208 | impl ast::GenericParamsOwner for UnionDef {} | 208 | impl ast::GenericParamsOwner for UnionDef {} |
209 | impl UnionDef { | 209 | impl UnionDef { |
210 | pub fn union_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![union]) } | 210 | pub fn union_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![union]) } |
211 | pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> { | 211 | pub fn record_field_list(&self) -> Option<RecordFieldList> { support::child(&self.syntax) } |
212 | support::child(&self.syntax) | ||
213 | } | ||
214 | } | 212 | } |
215 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 213 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
216 | pub struct Use { | 214 | pub struct Use { |
@@ -391,42 +389,42 @@ impl TypeBoundList { | |||
391 | pub fn bounds(&self) -> AstChildren<TypeBound> { support::children(&self.syntax) } | 389 | pub fn bounds(&self) -> AstChildren<TypeBound> { support::children(&self.syntax) } |
392 | } | 390 | } |
393 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 391 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
394 | pub struct RecordFieldDefList { | 392 | pub struct RecordFieldList { |
395 | pub(crate) syntax: SyntaxNode, | 393 | pub(crate) syntax: SyntaxNode, |
396 | } | 394 | } |
397 | impl RecordFieldDefList { | 395 | impl RecordFieldList { |
398 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } | 396 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } |
399 | pub fn fields(&self) -> AstChildren<RecordFieldDef> { support::children(&self.syntax) } | 397 | pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) } |
400 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } | 398 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } |
401 | } | 399 | } |
402 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 400 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
403 | pub struct TupleFieldDefList { | 401 | pub struct TupleFieldList { |
404 | pub(crate) syntax: SyntaxNode, | 402 | pub(crate) syntax: SyntaxNode, |
405 | } | 403 | } |
406 | impl TupleFieldDefList { | 404 | impl TupleFieldList { |
407 | pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) } | 405 | pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) } |
408 | pub fn fields(&self) -> AstChildren<TupleFieldDef> { support::children(&self.syntax) } | 406 | pub fn fields(&self) -> AstChildren<TupleField> { support::children(&self.syntax) } |
409 | pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } | 407 | pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } |
410 | } | 408 | } |
411 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 409 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
412 | pub struct RecordFieldDef { | 410 | pub struct RecordField { |
413 | pub(crate) syntax: SyntaxNode, | 411 | pub(crate) syntax: SyntaxNode, |
414 | } | 412 | } |
415 | impl ast::AttrsOwner for RecordFieldDef {} | 413 | impl ast::AttrsOwner for RecordField {} |
416 | impl ast::NameOwner for RecordFieldDef {} | 414 | impl ast::NameOwner for RecordField {} |
417 | impl ast::VisibilityOwner for RecordFieldDef {} | 415 | impl ast::VisibilityOwner for RecordField {} |
418 | impl ast::TypeAscriptionOwner for RecordFieldDef {} | 416 | impl ast::TypeAscriptionOwner for RecordField {} |
419 | impl RecordFieldDef { | 417 | impl RecordField { |
420 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } | 418 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } |
421 | } | 419 | } |
422 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 420 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
423 | pub struct TupleFieldDef { | 421 | pub struct TupleField { |
424 | pub(crate) syntax: SyntaxNode, | 422 | pub(crate) syntax: SyntaxNode, |
425 | } | 423 | } |
426 | impl ast::AttrsOwner for TupleFieldDef {} | 424 | impl ast::AttrsOwner for TupleField {} |
427 | impl ast::NameOwner for TupleFieldDef {} | 425 | impl ast::NameOwner for TupleField {} |
428 | impl ast::VisibilityOwner for TupleFieldDef {} | 426 | impl ast::VisibilityOwner for TupleField {} |
429 | impl TupleFieldDef { | 427 | impl TupleField { |
430 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 428 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
431 | } | 429 | } |
432 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 430 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -446,7 +444,7 @@ impl ast::AttrsOwner for EnumVariant {} | |||
446 | impl ast::NameOwner for EnumVariant {} | 444 | impl ast::NameOwner for EnumVariant {} |
447 | impl ast::VisibilityOwner for EnumVariant {} | 445 | impl ast::VisibilityOwner for EnumVariant {} |
448 | impl EnumVariant { | 446 | impl EnumVariant { |
449 | pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) } | 447 | pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) } |
450 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } | 448 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } |
451 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 449 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
452 | } | 450 | } |
@@ -1326,9 +1324,9 @@ pub enum Pat { | |||
1326 | MacroPat(MacroPat), | 1324 | MacroPat(MacroPat), |
1327 | } | 1325 | } |
1328 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1326 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1329 | pub enum FieldDefList { | 1327 | pub enum FieldList { |
1330 | RecordFieldDefList(RecordFieldDefList), | 1328 | RecordFieldList(RecordFieldList), |
1331 | TupleFieldDefList(TupleFieldDefList), | 1329 | TupleFieldList(TupleFieldList), |
1332 | } | 1330 | } |
1333 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1331 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1334 | pub enum Expr { | 1332 | pub enum Expr { |
@@ -1765,8 +1763,8 @@ impl AstNode for TypeBoundList { | |||
1765 | } | 1763 | } |
1766 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1764 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1767 | } | 1765 | } |
1768 | impl AstNode for RecordFieldDefList { | 1766 | impl AstNode for RecordFieldList { |
1769 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_DEF_LIST } | 1767 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_LIST } |
1770 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1768 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1771 | if Self::can_cast(syntax.kind()) { | 1769 | if Self::can_cast(syntax.kind()) { |
1772 | Some(Self { syntax }) | 1770 | Some(Self { syntax }) |
@@ -1776,8 +1774,8 @@ impl AstNode for RecordFieldDefList { | |||
1776 | } | 1774 | } |
1777 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1775 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1778 | } | 1776 | } |
1779 | impl AstNode for TupleFieldDefList { | 1777 | impl AstNode for TupleFieldList { |
1780 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_DEF_LIST } | 1778 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_LIST } |
1781 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1779 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1782 | if Self::can_cast(syntax.kind()) { | 1780 | if Self::can_cast(syntax.kind()) { |
1783 | Some(Self { syntax }) | 1781 | Some(Self { syntax }) |
@@ -1787,8 +1785,8 @@ impl AstNode for TupleFieldDefList { | |||
1787 | } | 1785 | } |
1788 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1786 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1789 | } | 1787 | } |
1790 | impl AstNode for RecordFieldDef { | 1788 | impl AstNode for RecordField { |
1791 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_DEF } | 1789 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD } |
1792 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1790 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1793 | if Self::can_cast(syntax.kind()) { | 1791 | if Self::can_cast(syntax.kind()) { |
1794 | Some(Self { syntax }) | 1792 | Some(Self { syntax }) |
@@ -1798,8 +1796,8 @@ impl AstNode for RecordFieldDef { | |||
1798 | } | 1796 | } |
1799 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1797 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1800 | } | 1798 | } |
1801 | impl AstNode for TupleFieldDef { | 1799 | impl AstNode for TupleField { |
1802 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_DEF } | 1800 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD } |
1803 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1801 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1804 | if Self::can_cast(syntax.kind()) { | 1802 | if Self::can_cast(syntax.kind()) { |
1805 | Some(Self { syntax }) | 1803 | Some(Self { syntax }) |
@@ -3046,33 +3044,31 @@ impl AstNode for Pat { | |||
3046 | } | 3044 | } |
3047 | } | 3045 | } |
3048 | } | 3046 | } |
3049 | impl From<RecordFieldDefList> for FieldDefList { | 3047 | impl From<RecordFieldList> for FieldList { |
3050 | fn from(node: RecordFieldDefList) -> FieldDefList { FieldDefList::RecordFieldDefList(node) } | 3048 | fn from(node: RecordFieldList) -> FieldList { FieldList::RecordFieldList(node) } |
3051 | } | 3049 | } |
3052 | impl From<TupleFieldDefList> for FieldDefList { | 3050 | impl From<TupleFieldList> for FieldList { |
3053 | fn from(node: TupleFieldDefList) -> FieldDefList { FieldDefList::TupleFieldDefList(node) } | 3051 | fn from(node: TupleFieldList) -> FieldList { FieldList::TupleFieldList(node) } |
3054 | } | 3052 | } |
3055 | impl AstNode for FieldDefList { | 3053 | impl AstNode for FieldList { |
3056 | fn can_cast(kind: SyntaxKind) -> bool { | 3054 | fn can_cast(kind: SyntaxKind) -> bool { |
3057 | match kind { | 3055 | match kind { |
3058 | RECORD_FIELD_DEF_LIST | TUPLE_FIELD_DEF_LIST => true, | 3056 | RECORD_FIELD_LIST | TUPLE_FIELD_LIST => true, |
3059 | _ => false, | 3057 | _ => false, |
3060 | } | 3058 | } |
3061 | } | 3059 | } |
3062 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 3060 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
3063 | let res = match syntax.kind() { | 3061 | let res = match syntax.kind() { |
3064 | RECORD_FIELD_DEF_LIST => { | 3062 | RECORD_FIELD_LIST => FieldList::RecordFieldList(RecordFieldList { syntax }), |
3065 | FieldDefList::RecordFieldDefList(RecordFieldDefList { syntax }) | 3063 | TUPLE_FIELD_LIST => FieldList::TupleFieldList(TupleFieldList { syntax }), |
3066 | } | ||
3067 | TUPLE_FIELD_DEF_LIST => FieldDefList::TupleFieldDefList(TupleFieldDefList { syntax }), | ||
3068 | _ => return None, | 3064 | _ => return None, |
3069 | }; | 3065 | }; |
3070 | Some(res) | 3066 | Some(res) |
3071 | } | 3067 | } |
3072 | fn syntax(&self) -> &SyntaxNode { | 3068 | fn syntax(&self) -> &SyntaxNode { |
3073 | match self { | 3069 | match self { |
3074 | FieldDefList::RecordFieldDefList(it) => &it.syntax, | 3070 | FieldList::RecordFieldList(it) => &it.syntax, |
3075 | FieldDefList::TupleFieldDefList(it) => &it.syntax, | 3071 | FieldList::TupleFieldList(it) => &it.syntax, |
3076 | } | 3072 | } |
3077 | } | 3073 | } |
3078 | } | 3074 | } |
@@ -3425,7 +3421,7 @@ impl std::fmt::Display for Pat { | |||
3425 | std::fmt::Display::fmt(self.syntax(), f) | 3421 | std::fmt::Display::fmt(self.syntax(), f) |
3426 | } | 3422 | } |
3427 | } | 3423 | } |
3428 | impl std::fmt::Display for FieldDefList { | 3424 | impl std::fmt::Display for FieldList { |
3429 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3425 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3430 | std::fmt::Display::fmt(self.syntax(), f) | 3426 | std::fmt::Display::fmt(self.syntax(), f) |
3431 | } | 3427 | } |
@@ -3625,22 +3621,22 @@ impl std::fmt::Display for TypeBoundList { | |||
3625 | std::fmt::Display::fmt(self.syntax(), f) | 3621 | std::fmt::Display::fmt(self.syntax(), f) |
3626 | } | 3622 | } |
3627 | } | 3623 | } |
3628 | impl std::fmt::Display for RecordFieldDefList { | 3624 | impl std::fmt::Display for RecordFieldList { |
3629 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3625 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3630 | std::fmt::Display::fmt(self.syntax(), f) | 3626 | std::fmt::Display::fmt(self.syntax(), f) |
3631 | } | 3627 | } |
3632 | } | 3628 | } |
3633 | impl std::fmt::Display for TupleFieldDefList { | 3629 | impl std::fmt::Display for TupleFieldList { |
3634 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3630 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3635 | std::fmt::Display::fmt(self.syntax(), f) | 3631 | std::fmt::Display::fmt(self.syntax(), f) |
3636 | } | 3632 | } |
3637 | } | 3633 | } |
3638 | impl std::fmt::Display for RecordFieldDef { | 3634 | impl std::fmt::Display for RecordField { |
3639 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3635 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3640 | std::fmt::Display::fmt(self.syntax(), f) | 3636 | std::fmt::Display::fmt(self.syntax(), f) |
3641 | } | 3637 | } |
3642 | } | 3638 | } |
3643 | impl std::fmt::Display for TupleFieldDef { | 3639 | impl std::fmt::Display for TupleField { |
3644 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3640 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3645 | std::fmt::Display::fmt(self.syntax(), f) | 3641 | std::fmt::Display::fmt(self.syntax(), f) |
3646 | } | 3642 | } |
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs index 183ec4481..509e8ae7a 100644 --- a/crates/ra_syntax/src/ast/make.rs +++ b/crates/ra_syntax/src/ast/make.rs | |||
@@ -75,7 +75,7 @@ pub fn record_field(name: ast::NameRef, expr: Option<ast::Expr>) -> ast::RecordE | |||
75 | } | 75 | } |
76 | } | 76 | } |
77 | 77 | ||
78 | pub fn record_field_def(name: ast::NameRef, ty: ast::TypeRef) -> ast::RecordFieldDef { | 78 | pub fn record_field_def(name: ast::NameRef, ty: ast::TypeRef) -> ast::RecordField { |
79 | ast_from_text(&format!("struct S {{ {}: {}, }}", name, ty)) | 79 | ast_from_text(&format!("struct S {{ {}: {}, }}", name, ty)) |
80 | } | 80 | } |
81 | 81 | ||
diff --git a/crates/ra_syntax/src/ast/node_ext.rs b/crates/ra_syntax/src/ast/node_ext.rs index 8c7457e32..ffe6746d3 100644 --- a/crates/ra_syntax/src/ast/node_ext.rs +++ b/crates/ra_syntax/src/ast/node_ext.rs | |||
@@ -166,16 +166,16 @@ impl ast::ImplDef { | |||
166 | 166 | ||
167 | #[derive(Debug, Clone, PartialEq, Eq)] | 167 | #[derive(Debug, Clone, PartialEq, Eq)] |
168 | pub enum StructKind { | 168 | pub enum StructKind { |
169 | Record(ast::RecordFieldDefList), | 169 | Record(ast::RecordFieldList), |
170 | Tuple(ast::TupleFieldDefList), | 170 | Tuple(ast::TupleFieldList), |
171 | Unit, | 171 | Unit, |
172 | } | 172 | } |
173 | 173 | ||
174 | impl StructKind { | 174 | impl StructKind { |
175 | fn from_node<N: AstNode>(node: &N) -> StructKind { | 175 | fn from_node<N: AstNode>(node: &N) -> StructKind { |
176 | if let Some(nfdl) = support::child::<ast::RecordFieldDefList>(node.syntax()) { | 176 | if let Some(nfdl) = support::child::<ast::RecordFieldList>(node.syntax()) { |
177 | StructKind::Record(nfdl) | 177 | StructKind::Record(nfdl) |
178 | } else if let Some(pfl) = support::child::<ast::TupleFieldDefList>(node.syntax()) { | 178 | } else if let Some(pfl) = support::child::<ast::TupleFieldList>(node.syntax()) { |
179 | StructKind::Tuple(pfl) | 179 | StructKind::Tuple(pfl) |
180 | } else { | 180 | } else { |
181 | StructKind::Unit | 181 | StructKind::Unit |
@@ -477,8 +477,8 @@ impl ast::DocCommentsOwner for ast::SourceFile {} | |||
477 | impl ast::DocCommentsOwner for ast::Fn {} | 477 | impl ast::DocCommentsOwner for ast::Fn {} |
478 | impl ast::DocCommentsOwner for ast::StructDef {} | 478 | impl ast::DocCommentsOwner for ast::StructDef {} |
479 | impl ast::DocCommentsOwner for ast::UnionDef {} | 479 | impl ast::DocCommentsOwner for ast::UnionDef {} |
480 | impl ast::DocCommentsOwner for ast::RecordFieldDef {} | 480 | impl ast::DocCommentsOwner for ast::RecordField {} |
481 | impl ast::DocCommentsOwner for ast::TupleFieldDef {} | 481 | impl ast::DocCommentsOwner for ast::TupleField {} |
482 | impl ast::DocCommentsOwner for ast::EnumDef {} | 482 | impl ast::DocCommentsOwner for ast::EnumDef {} |
483 | impl ast::DocCommentsOwner for ast::EnumVariant {} | 483 | impl ast::DocCommentsOwner for ast::EnumVariant {} |
484 | impl ast::DocCommentsOwner for ast::TraitDef {} | 484 | impl ast::DocCommentsOwner for ast::TraitDef {} |
diff --git a/crates/ra_syntax/src/parsing/text_tree_sink.rs b/crates/ra_syntax/src/parsing/text_tree_sink.rs index 87a7acd09..0a1246c59 100644 --- a/crates/ra_syntax/src/parsing/text_tree_sink.rs +++ b/crates/ra_syntax/src/parsing/text_tree_sink.rs | |||
@@ -147,7 +147,7 @@ fn n_attached_trivias<'a>( | |||
147 | ) -> usize { | 147 | ) -> usize { |
148 | match kind { | 148 | match kind { |
149 | MACRO_CALL | CONST_DEF | TYPE_ALIAS | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN | 149 | MACRO_CALL | CONST_DEF | TYPE_ALIAS | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN |
150 | | TRAIT_DEF | MODULE | RECORD_FIELD_DEF | STATIC_DEF => { | 150 | | TRAIT_DEF | MODULE | RECORD_FIELD | STATIC_DEF => { |
151 | let mut res = 0; | 151 | let mut res = 0; |
152 | let mut trivias = trivias.enumerate().peekable(); | 152 | let mut trivias = trivias.enumerate().peekable(); |
153 | 153 | ||
diff --git a/crates/ra_syntax/src/ptr.rs b/crates/ra_syntax/src/ptr.rs index 62f03e93d..ca7957747 100644 --- a/crates/ra_syntax/src/ptr.rs +++ b/crates/ra_syntax/src/ptr.rs | |||
@@ -98,7 +98,7 @@ fn test_local_syntax_ptr() { | |||
98 | use crate::{ast, AstNode, SourceFile}; | 98 | use crate::{ast, AstNode, SourceFile}; |
99 | 99 | ||
100 | let file = SourceFile::parse("struct Foo { f: u32, }").ok().unwrap(); | 100 | let file = SourceFile::parse("struct Foo { f: u32, }").ok().unwrap(); |
101 | let field = file.syntax().descendants().find_map(ast::RecordFieldDef::cast).unwrap(); | 101 | let field = file.syntax().descendants().find_map(ast::RecordField::cast).unwrap(); |
102 | let ptr = SyntaxNodePtr::new(field.syntax()); | 102 | let ptr = SyntaxNodePtr::new(field.syntax()); |
103 | let field_syntax = ptr.to_node(file.syntax()); | 103 | let field_syntax = ptr.to_node(file.syntax()); |
104 | assert_eq!(field.syntax(), &field_syntax); | 104 | assert_eq!(field.syntax(), &field_syntax); |
diff --git a/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rast b/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rast index 81f0f575c..93f6060ed 100644 --- a/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rast +++ b/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rast | |||
@@ -5,10 +5,10 @@ [email protected] | |||
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S" | 6 | [email protected] "S" |
7 | [email protected] " " | 7 | [email protected] " " |
8 | RECORD_FIELD_DEF_[email protected] | 8 | [email protected] |
9 | [email protected] "{" | 9 | [email protected] "{" |
10 | [email protected] "\n " | 10 | [email protected] "\n " |
11 | RECORD_FIELD_DEF@15..21 | 11 | [email protected] |
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "a" | 13 | [email protected] "a" |
14 | [email protected] ":" | 14 | [email protected] ":" |
@@ -19,7 +19,7 @@ [email protected] | |||
19 | [email protected] | 19 | [email protected] |
20 | [email protected] "u32" | 20 | [email protected] "u32" |
21 | [email protected] "\n " | 21 | [email protected] "\n " |
22 | RECORD_FIELD_DEF@26..32 | 22 | [email protected] |
23 | [email protected] | 23 | [email protected] |
24 | [email protected] "b" | 24 | [email protected] "b" |
25 | [email protected] ":" | 25 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rast b/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rast index 97d0fe910..7e2f429e1 100644 --- a/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rast +++ b/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rast | |||
@@ -11,7 +11,7 @@ [email protected] | |||
11 | [email protected] | 11 | [email protected] |
12 | [email protected] "S" | 12 | [email protected] "S" |
13 | [email protected] " " | 13 | [email protected] " " |
14 | RECORD_FIELD_DEF_[email protected] | 14 | [email protected] |
15 | [email protected] "{" | 15 | [email protected] "{" |
16 | [email protected] "}" | 16 | [email protected] "}" |
17 | error 0..0: expected an item | 17 | error 0..0: expected an item |
diff --git a/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rast b/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rast index 21c255698..e0f3916b3 100644 --- a/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rast +++ b/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rast | |||
@@ -5,10 +5,10 @@ [email protected] | |||
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S" | 6 | [email protected] "S" |
7 | [email protected] " " | 7 | [email protected] " " |
8 | RECORD_FIELD_DEF_[email protected] | 8 | [email protected] |
9 | [email protected] "{" | 9 | [email protected] "{" |
10 | [email protected] "\n " | 10 | [email protected] "\n " |
11 | RECORD_FIELD_DEF@15..21 | 11 | [email protected] |
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "a" | 13 | [email protected] "a" |
14 | [email protected] ":" | 14 | [email protected] ":" |
@@ -20,7 +20,7 @@ [email protected] | |||
20 | [email protected] "i32" | 20 | [email protected] "i32" |
21 | [email protected] "," | 21 | [email protected] "," |
22 | [email protected] "\n " | 22 | [email protected] "\n " |
23 | RECORD_FIELD_DEF@27..36 | 23 | [email protected] |
24 | [email protected] | 24 | [email protected] |
25 | [email protected] "b" | 25 | [email protected] "b" |
26 | [email protected] ":" | 26 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rast b/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rast index 2d6364998..ad9447761 100644 --- a/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rast +++ b/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rast | |||
@@ -5,10 +5,10 @@ [email protected] | |||
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S" | 6 | [email protected] "S" |
7 | [email protected] " " | 7 | [email protected] " " |
8 | RECORD_FIELD_DEF_[email protected] | 8 | [email protected] |
9 | [email protected] "{" | 9 | [email protected] "{" |
10 | [email protected] "\n " | 10 | [email protected] "\n " |
11 | RECORD_FIELD_DEF@15..21 | 11 | [email protected] |
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "f" | 13 | [email protected] "f" |
14 | [email protected] ":" | 14 | [email protected] ":" |
@@ -35,7 +35,7 @@ [email protected] | |||
35 | [email protected] | 35 | [email protected] |
36 | [email protected] "*" | 36 | [email protected] "*" |
37 | [email protected] "\n " | 37 | [email protected] "\n " |
38 | RECORD_FIELD_DEF@48..58 | 38 | [email protected] |
39 | [email protected] | 39 | [email protected] |
40 | [email protected] "pub" | 40 | [email protected] "pub" |
41 | [email protected] " " | 41 | [email protected] " " |
@@ -50,7 +50,7 @@ [email protected] | |||
50 | [email protected] "u32" | 50 | [email protected] "u32" |
51 | [email protected] "," | 51 | [email protected] "," |
52 | [email protected] "\n " | 52 | [email protected] "\n " |
53 | RECORD_FIELD_DEF@64..70 | 53 | [email protected] |
54 | [email protected] | 54 | [email protected] |
55 | [email protected] "z" | 55 | [email protected] "z" |
56 | [email protected] ":" | 56 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/err/0013_invalid_type.rast b/crates/ra_syntax/test_data/parser/err/0013_invalid_type.rast index 211e5fd46..c3591d25c 100644 --- a/crates/ra_syntax/test_data/parser/err/0013_invalid_type.rast +++ b/crates/ra_syntax/test_data/parser/err/0013_invalid_type.rast | |||
@@ -7,10 +7,10 @@ [email protected] | |||
7 | [email protected] " " | 7 | [email protected] " " |
8 | [email protected] | 8 | [email protected] |
9 | [email protected] "Cache" | 9 | [email protected] "Cache" |
10 | TUPLE_FIELD_DEF_[email protected] | 10 | [email protected] |
11 | [email protected] "(" | 11 | [email protected] "(" |
12 | [email protected] "\n " | 12 | [email protected] "\n " |
13 | TUPLE_FIELD_DEF@22..68 | 13 | [email protected] |
14 | [email protected] | 14 | [email protected] |
15 | [email protected] | 15 | [email protected] |
16 | [email protected] | 16 | [email protected] |
@@ -47,7 +47,7 @@ [email protected] | |||
47 | [email protected] | 47 | [email protected] |
48 | [email protected] "@" | 48 | [email protected] "@" |
49 | [email protected] " " | 49 | [email protected] " " |
50 | TUPLE_FIELD_DEF@69..72 | 50 | [email protected] |
51 | [email protected] | 51 | [email protected] |
52 | [email protected] | 52 | [email protected] |
53 | [email protected] | 53 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0025_nope.rast b/crates/ra_syntax/test_data/parser/err/0025_nope.rast index 4b9bd679e..a1258028d 100644 --- a/crates/ra_syntax/test_data/parser/err/0025_nope.rast +++ b/crates/ra_syntax/test_data/parser/err/0025_nope.rast | |||
@@ -28,9 +28,9 @@ [email protected] | |||
28 | [email protected] | 28 | [email protected] |
29 | [email protected] | 29 | [email protected] |
30 | [email protected] "Var2" | 30 | [email protected] "Var2" |
31 | TUPLE_FIELD_DEF_[email protected] | 31 | [email protected] |
32 | [email protected] "(" | 32 | [email protected] "(" |
33 | TUPLE_FIELD_DEF@55..61 | 33 | [email protected] |
34 | [email protected] | 34 | [email protected] |
35 | [email protected] | 35 | [email protected] |
36 | [email protected] | 36 | [email protected] |
@@ -43,10 +43,10 @@ [email protected] | |||
43 | [email protected] | 43 | [email protected] |
44 | [email protected] "Var3" | 44 | [email protected] "Var3" |
45 | [email protected] " " | 45 | [email protected] " " |
46 | RECORD_FIELD_DEF_[email protected] | 46 | [email protected] |
47 | [email protected] "{" | 47 | [email protected] "{" |
48 | [email protected] "\n " | 48 | [email protected] "\n " |
49 | RECORD_FIELD_DEF@91..95 | 49 | [email protected] |
50 | [email protected] | 50 | [email protected] |
51 | [email protected] "abc" | 51 | [email protected] "abc" |
52 | [email protected] ":" | 52 | [email protected] ":" |
@@ -108,10 +108,10 @@ [email protected] | |||
108 | [email protected] | 108 | [email protected] |
109 | [email protected] "StillFine" | 109 | [email protected] "StillFine" |
110 | [email protected] " " | 110 | [email protected] " " |
111 | RECORD_FIELD_DEF_[email protected] | 111 | [email protected] |
112 | [email protected] "{" | 112 | [email protected] "{" |
113 | [email protected] "\n " | 113 | [email protected] "\n " |
114 | RECORD_FIELD_DEF@274..282 | 114 | [email protected] |
115 | [email protected] | 115 | [email protected] |
116 | [email protected] "def" | 116 | [email protected] "def" |
117 | [email protected] ":" | 117 | [email protected] ":" |
@@ -146,9 +146,9 @@ [email protected] | |||
146 | [email protected] | 146 | [email protected] |
147 | [email protected] | 147 | [email protected] |
148 | [email protected] "Nope" | 148 | [email protected] "Nope" |
149 | TUPLE_FIELD_DEF_[email protected] | 149 | [email protected] |
150 | [email protected] "(" | 150 | [email protected] "(" |
151 | TUPLE_FIELD_DEF@368..371 | 151 | [email protected] |
152 | [email protected] | 152 | [email protected] |
153 | [email protected] | 153 | [email protected] |
154 | [email protected] | 154 | [email protected] |
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 0e6e0ccc3..f1d0dc343 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 | RECORD_FIELD_DEF_LIST => grammar::record_field_def_list, | 89 | RECORD_FIELD_LIST => grammar::record_field_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::record_field_def_list, | 141 | text.replaT => grammar::record_field_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/0040_crate_keyword_vis.rast b/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast index 47cbe7c1f..a0ad07807 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast | |||
@@ -22,10 +22,10 @@ [email protected] | |||
22 | [email protected] | 22 | [email protected] |
23 | [email protected] "S" | 23 | [email protected] "S" |
24 | [email protected] " " | 24 | [email protected] " " |
25 | RECORD_FIELD_DEF_[email protected] | 25 | [email protected] |
26 | [email protected] "{" | 26 | [email protected] "{" |
27 | [email protected] " " | 27 | [email protected] " " |
28 | RECORD_FIELD_DEF@31..47 | 28 | [email protected] |
29 | [email protected] | 29 | [email protected] |
30 | [email protected] "crate" | 30 | [email protected] "crate" |
31 | [email protected] " " | 31 | [email protected] " " |
@@ -46,9 +46,9 @@ [email protected] | |||
46 | [email protected] " " | 46 | [email protected] " " |
47 | [email protected] | 47 | [email protected] |
48 | [email protected] "T" | 48 | [email protected] "T" |
49 | TUPLE_FIELD_DEF_[email protected] | 49 | [email protected] |
50 | [email protected] "(" | 50 | [email protected] "(" |
51 | TUPLE_FIELD_DEF@59..68 | 51 | [email protected] |
52 | [email protected] | 52 | [email protected] |
53 | [email protected] "crate" | 53 | [email protected] "crate" |
54 | [email protected] " " | 54 | [email protected] " " |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast b/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast index 6362aa02d..775bc2869 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast | |||
@@ -5,10 +5,10 @@ [email protected] | |||
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S" | 6 | [email protected] "S" |
7 | [email protected] " " | 7 | [email protected] " " |
8 | RECORD_FIELD_DEF_[email protected] | 8 | [email protected] |
9 | [email protected] "{" | 9 | [email protected] "{" |
10 | [email protected] "\n " | 10 | [email protected] "\n " |
11 | RECORD_FIELD_DEF@15..60 | 11 | [email protected] |
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "#" | 13 | [email protected] "#" |
14 | [email protected] "[" | 14 | [email protected] "[" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.rast b/crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.rast index ec2496072..2726516b8 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0068_union_items.rast | |||
@@ -5,7 +5,7 @@ [email protected] | |||
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "Foo" | 6 | [email protected] "Foo" |
7 | [email protected] " " | 7 | [email protected] " " |
8 | RECORD_FIELD_DEF_[email protected] | 8 | [email protected] |
9 | [email protected] "{" | 9 | [email protected] "{" |
10 | [email protected] "}" | 10 | [email protected] "}" |
11 | [email protected] "\n" | 11 | [email protected] "\n" |
@@ -15,10 +15,10 @@ [email protected] | |||
15 | [email protected] | 15 | [email protected] |
16 | [email protected] "Foo" | 16 | [email protected] "Foo" |
17 | [email protected] " " | 17 | [email protected] " " |
18 | RECORD_FIELD_DEF_[email protected] | 18 | [email protected] |
19 | [email protected] "{" | 19 | [email protected] "{" |
20 | [email protected] "\n " | 20 | [email protected] "\n " |
21 | RECORD_FIELD_DEF@29..35 | 21 | [email protected] |
22 | [email protected] | 22 | [email protected] |
23 | [email protected] "a" | 23 | [email protected] "a" |
24 | [email protected] ":" | 24 | [email protected] ":" |
@@ -30,7 +30,7 @@ [email protected] | |||
30 | [email protected] "i32" | 30 | [email protected] "i32" |
31 | [email protected] "," | 31 | [email protected] "," |
32 | [email protected] "\n " | 32 | [email protected] "\n " |
33 | RECORD_FIELD_DEF@41..47 | 33 | [email protected] |
34 | [email protected] | 34 | [email protected] |
35 | [email protected] "b" | 35 | [email protected] "b" |
36 | [email protected] ":" | 36 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rast b/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rast index 217b07e59..0d9a36618 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rast | |||
@@ -12,7 +12,7 @@ [email protected] | |||
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "Foo" | 13 | [email protected] "Foo" |
14 | [email protected] " " | 14 | [email protected] " " |
15 | RECORD_FIELD_DEF_[email protected] | 15 | [email protected] |
16 | [email protected] "{" | 16 | [email protected] "{" |
17 | [email protected] "}" | 17 | [email protected] "}" |
18 | [email protected] "\n" | 18 | [email protected] "\n" |
@@ -21,7 +21,7 @@ [email protected] | |||
21 | [email protected] " " | 21 | [email protected] " " |
22 | [email protected] | 22 | [email protected] |
23 | [email protected] "Foo" | 23 | [email protected] "Foo" |
24 | TUPLE_FIELD_DEF_[email protected] | 24 | [email protected] |
25 | [email protected] "(" | 25 | [email protected] "(" |
26 | [email protected] ")" | 26 | [email protected] ")" |
27 | [email protected] ";" | 27 | [email protected] ";" |
@@ -31,9 +31,9 @@ [email protected] | |||
31 | [email protected] " " | 31 | [email protected] " " |
32 | [email protected] | 32 | [email protected] |
33 | [email protected] "Foo" | 33 | [email protected] "Foo" |
34 | TUPLE_FIELD_DEF_[email protected] | 34 | [email protected] |
35 | [email protected] "(" | 35 | [email protected] "(" |
36 | TUPLE_FIELD_DEF@51..57 | 36 | [email protected] |
37 | [email protected] | 37 | [email protected] |
38 | [email protected] | 38 | [email protected] |
39 | [email protected] | 39 | [email protected] |
@@ -41,7 +41,7 @@ [email protected] | |||
41 | [email protected] "String" | 41 | [email protected] "String" |
42 | [email protected] "," | 42 | [email protected] "," |
43 | [email protected] " " | 43 | [email protected] " " |
44 | TUPLE_FIELD_DEF@59..64 | 44 | [email protected] |
45 | [email protected] | 45 | [email protected] |
46 | [email protected] | 46 | [email protected] |
47 | [email protected] | 47 | [email protected] |
@@ -56,10 +56,10 @@ [email protected] | |||
56 | [email protected] | 56 | [email protected] |
57 | [email protected] "Foo" | 57 | [email protected] "Foo" |
58 | [email protected] " " | 58 | [email protected] " " |
59 | RECORD_FIELD_DEF_[email protected] | 59 | [email protected] |
60 | [email protected] "{" | 60 | [email protected] "{" |
61 | [email protected] "\n " | 61 | [email protected] "\n " |
62 | RECORD_FIELD_DEF@84..90 | 62 | [email protected] |
63 | [email protected] | 63 | [email protected] |
64 | [email protected] "a" | 64 | [email protected] "a" |
65 | [email protected] ":" | 65 | [email protected] ":" |
@@ -71,7 +71,7 @@ [email protected] | |||
71 | [email protected] "i32" | 71 | [email protected] "i32" |
72 | [email protected] "," | 72 | [email protected] "," |
73 | [email protected] "\n " | 73 | [email protected] "\n " |
74 | RECORD_FIELD_DEF@96..102 | 74 | [email protected] |
75 | [email protected] | 75 | [email protected] |
76 | [email protected] "b" | 76 | [email protected] "b" |
77 | [email protected] ":" | 77 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast b/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast index 0b1ec5b27..3c9af3d1f 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast | |||
@@ -10,9 +10,9 @@ [email protected] | |||
10 | [email protected] | 10 | [email protected] |
11 | [email protected] "T" | 11 | [email protected] "T" |
12 | [email protected] ">" | 12 | [email protected] ">" |
13 | TUPLE_FIELD_DEF_[email protected] | 13 | [email protected] |
14 | [email protected] "(" | 14 | [email protected] "(" |
15 | TUPLE_FIELD_DEF@15..16 | 15 | [email protected] |
16 | [email protected] | 16 | [email protected] |
17 | [email protected] | 17 | [email protected] |
18 | [email protected] | 18 | [email protected] |
@@ -51,9 +51,9 @@ [email protected] | |||
51 | [email protected] | 51 | [email protected] |
52 | [email protected] "T" | 52 | [email protected] "T" |
53 | [email protected] ">" | 53 | [email protected] ">" |
54 | TUPLE_FIELD_DEF_[email protected] | 54 | [email protected] |
55 | [email protected] "(" | 55 | [email protected] "(" |
56 | TUPLE_FIELD_DEF@49..50 | 56 | [email protected] |
57 | [email protected] | 57 | [email protected] |
58 | [email protected] | 58 | [email protected] |
59 | [email protected] | 59 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast b/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast index 3c0ef9005..51812a4f2 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast | |||
@@ -5,10 +5,10 @@ [email protected] | |||
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S" | 6 | [email protected] "S" |
7 | [email protected] " " | 7 | [email protected] " " |
8 | TUPLE_FIELD_DEF_[email protected] | 8 | [email protected] |
9 | [email protected] "(" | 9 | [email protected] "(" |
10 | [email protected] "\n " | 10 | [email protected] "\n " |
11 | TUPLE_FIELD_DEF@15..55 | 11 | [email protected] |
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "#" | 13 | [email protected] "#" |
14 | [email protected] "[" | 14 | [email protected] "[" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast b/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast index ceae8a4ec..d92bf84f4 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast | |||
@@ -53,7 +53,7 @@ [email protected] | |||
53 | [email protected] | 53 | [email protected] |
54 | [email protected] "S" | 54 | [email protected] "S" |
55 | [email protected] " " | 55 | [email protected] " " |
56 | RECORD_FIELD_DEF_[email protected] | 56 | [email protected] |
57 | [email protected] "{" | 57 | [email protected] "{" |
58 | [email protected] "}" | 58 | [email protected] "}" |
59 | [email protected] ";" | 59 | [email protected] ";" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0157_variant_discriminant.rast b/crates/ra_syntax/test_data/parser/inline/ok/0157_variant_discriminant.rast index e8a0e9ddd..289fdfd6d 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0157_variant_discriminant.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0157_variant_discriminant.rast | |||
@@ -11,9 +11,9 @@ [email protected] | |||
11 | [email protected] | 11 | [email protected] |
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "X" | 13 | [email protected] "X" |
14 | TUPLE_FIELD_DEF_[email protected] | 14 | [email protected] |
15 | [email protected] "(" | 15 | [email protected] "(" |
16 | TUPLE_FIELD_DEF@11..14 | 16 | [email protected] |
17 | [email protected] | 17 | [email protected] |
18 | [email protected] | 18 | [email protected] |
19 | [email protected] | 19 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/ok/0001_struct_item.rast b/crates/ra_syntax/test_data/parser/ok/0001_struct_item.rast index cf801aedd..c9d1af92f 100644 --- a/crates/ra_syntax/test_data/parser/ok/0001_struct_item.rast +++ b/crates/ra_syntax/test_data/parser/ok/0001_struct_item.rast | |||
@@ -20,10 +20,10 @@ [email protected] | |||
20 | [email protected] "Copy" | 20 | [email protected] "Copy" |
21 | [email protected] ">" | 21 | [email protected] ">" |
22 | [email protected] " " | 22 | [email protected] " " |
23 | RECORD_FIELD_DEF_[email protected] | 23 | [email protected] |
24 | [email protected] "{" | 24 | [email protected] "{" |
25 | [email protected] "\n " | 25 | [email protected] "\n " |
26 | RECORD_FIELD_DEF@24..28 | 26 | [email protected] |
27 | [email protected] | 27 | [email protected] |
28 | [email protected] "f" | 28 | [email protected] "f" |
29 | [email protected] ":" | 29 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rast b/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rast index a1d546491..57fb7a329 100644 --- a/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rast +++ b/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rast | |||
@@ -5,10 +5,10 @@ [email protected] | |||
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S" | 6 | [email protected] "S" |
7 | [email protected] " " | 7 | [email protected] " " |
8 | RECORD_FIELD_DEF_[email protected] | 8 | [email protected] |
9 | [email protected] "{" | 9 | [email protected] "{" |
10 | [email protected] "\n " | 10 | [email protected] "\n " |
11 | RECORD_FIELD_DEF@15..23 | 11 | [email protected] |
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "foo" | 13 | [email protected] "foo" |
14 | [email protected] ":" | 14 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast b/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast index ea26f1440..60ded78d5 100644 --- a/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast +++ b/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast | |||
@@ -46,7 +46,7 @@ [email protected] | |||
46 | [email protected] | 46 | [email protected] |
47 | [email protected] "S" | 47 | [email protected] "S" |
48 | [email protected] " " | 48 | [email protected] " " |
49 | RECORD_FIELD_DEF_[email protected] | 49 | [email protected] |
50 | [email protected] "{" | 50 | [email protected] "{" |
51 | [email protected] "}" | 51 | [email protected] "}" |
52 | [email protected] "\n" | 52 | [email protected] "\n" |
diff --git a/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rast b/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rast index 95656d19b..00b1b65be 100644 --- a/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rast +++ b/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rast | |||
@@ -12,7 +12,7 @@ [email protected] | |||
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "B" | 13 | [email protected] "B" |
14 | [email protected] " " | 14 | [email protected] " " |
15 | RECORD_FIELD_DEF_[email protected] | 15 | [email protected] |
16 | [email protected] "{" | 16 | [email protected] "{" |
17 | [email protected] "}" | 17 | [email protected] "}" |
18 | [email protected] "\n" | 18 | [email protected] "\n" |
@@ -21,7 +21,7 @@ [email protected] | |||
21 | [email protected] " " | 21 | [email protected] " " |
22 | [email protected] | 22 | [email protected] |
23 | [email protected] "C" | 23 | [email protected] "C" |
24 | TUPLE_FIELD_DEF_[email protected] | 24 | [email protected] |
25 | [email protected] "(" | 25 | [email protected] "(" |
26 | [email protected] ")" | 26 | [email protected] ")" |
27 | [email protected] ";" | 27 | [email protected] ";" |
@@ -32,10 +32,10 @@ [email protected] | |||
32 | [email protected] | 32 | [email protected] |
33 | [email protected] "D" | 33 | [email protected] "D" |
34 | [email protected] " " | 34 | [email protected] " " |
35 | RECORD_FIELD_DEF_[email protected] | 35 | [email protected] |
36 | [email protected] "{" | 36 | [email protected] "{" |
37 | [email protected] "\n " | 37 | [email protected] "\n " |
38 | RECORD_FIELD_DEF@50..56 | 38 | [email protected] |
39 | [email protected] | 39 | [email protected] |
40 | [email protected] "a" | 40 | [email protected] "a" |
41 | [email protected] ":" | 41 | [email protected] ":" |
@@ -47,7 +47,7 @@ [email protected] | |||
47 | [email protected] "u32" | 47 | [email protected] "u32" |
48 | [email protected] "," | 48 | [email protected] "," |
49 | [email protected] "\n " | 49 | [email protected] "\n " |
50 | RECORD_FIELD_DEF@62..72 | 50 | [email protected] |
51 | [email protected] | 51 | [email protected] |
52 | [email protected] "pub" | 52 | [email protected] "pub" |
53 | [email protected] " " | 53 | [email protected] " " |
@@ -68,9 +68,9 @@ [email protected] | |||
68 | [email protected] " " | 68 | [email protected] " " |
69 | [email protected] | 69 | [email protected] |
70 | [email protected] "E" | 70 | [email protected] "E" |
71 | TUPLE_FIELD_DEF_[email protected] | 71 | [email protected] |
72 | [email protected] "(" | 72 | [email protected] "(" |
73 | TUPLE_FIELD_DEF@85..90 | 73 | [email protected] |
74 | [email protected] | 74 | [email protected] |
75 | [email protected] "pub" | 75 | [email protected] "pub" |
76 | [email protected] " " | 76 | [email protected] " " |
@@ -81,7 +81,7 @@ [email protected] | |||
81 | [email protected] "x" | 81 | [email protected] "x" |
82 | [email protected] "," | 82 | [email protected] "," |
83 | [email protected] " " | 83 | [email protected] " " |
84 | TUPLE_FIELD_DEF@92..93 | 84 | [email protected] |
85 | [email protected] | 85 | [email protected] |
86 | [email protected] | 86 | [email protected] |
87 | [email protected] | 87 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rast b/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rast index 3ee208fff..b757bd16d 100644 --- a/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rast +++ b/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rast | |||
@@ -23,9 +23,9 @@ [email protected] | |||
23 | [email protected] | 23 | [email protected] |
24 | [email protected] "T" | 24 | [email protected] "T" |
25 | [email protected] ">" | 25 | [email protected] ">" |
26 | TUPLE_FIELD_DEF_[email protected] | 26 | [email protected] |
27 | [email protected] "(" | 27 | [email protected] "(" |
28 | TUPLE_FIELD_DEF@27..30 | 28 | [email protected] |
29 | [email protected] | 29 | [email protected] |
30 | [email protected] | 30 | [email protected] |
31 | [email protected] | 31 | [email protected] |
@@ -46,10 +46,10 @@ [email protected] | |||
46 | [email protected] "T" | 46 | [email protected] "T" |
47 | [email protected] ">" | 47 | [email protected] ">" |
48 | [email protected] " " | 48 | [email protected] " " |
49 | RECORD_FIELD_DEF_[email protected] | 49 | [email protected] |
50 | [email protected] "{" | 50 | [email protected] "{" |
51 | [email protected] " " | 51 | [email protected] " " |
52 | RECORD_FIELD_DEF@48..54 | 52 | [email protected] |
53 | [email protected] | 53 | [email protected] |
54 | [email protected] "u" | 54 | [email protected] "u" |
55 | [email protected] ":" | 55 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/ok/0019_enums.rast b/crates/ra_syntax/test_data/parser/ok/0019_enums.rast index 993f28c4d..1a32d88fd 100644 --- a/crates/ra_syntax/test_data/parser/ok/0019_enums.rast +++ b/crates/ra_syntax/test_data/parser/ok/0019_enums.rast | |||
@@ -86,10 +86,10 @@ [email protected] | |||
86 | [email protected] | 86 | [email protected] |
87 | [email protected] "C" | 87 | [email protected] "C" |
88 | [email protected] " " | 88 | [email protected] " " |
89 | RECORD_FIELD_DEF_[email protected] | 89 | [email protected] |
90 | [email protected] "{" | 90 | [email protected] "{" |
91 | [email protected] "\n " | 91 | [email protected] "\n " |
92 | RECORD_FIELD_DEF@113..119 | 92 | [email protected] |
93 | [email protected] | 93 | [email protected] |
94 | [email protected] "a" | 94 | [email protected] "a" |
95 | [email protected] ":" | 95 | [email protected] ":" |
@@ -101,7 +101,7 @@ [email protected] | |||
101 | [email protected] "u32" | 101 | [email protected] "u32" |
102 | [email protected] "," | 102 | [email protected] "," |
103 | [email protected] "\n " | 103 | [email protected] "\n " |
104 | RECORD_FIELD_DEF@129..139 | 104 | [email protected] |
105 | [email protected] | 105 | [email protected] |
106 | [email protected] "pub" | 106 | [email protected] "pub" |
107 | [email protected] " " | 107 | [email protected] " " |
@@ -123,7 +123,7 @@ [email protected] | |||
123 | [email protected] | 123 | [email protected] |
124 | [email protected] "F" | 124 | [email protected] "F" |
125 | [email protected] " " | 125 | [email protected] " " |
126 | RECORD_FIELD_DEF_[email protected] | 126 | [email protected] |
127 | [email protected] "{" | 127 | [email protected] "{" |
128 | [email protected] "}" | 128 | [email protected] "}" |
129 | [email protected] "," | 129 | [email protected] "," |
@@ -131,9 +131,9 @@ [email protected] | |||
131 | [email protected] | 131 | [email protected] |
132 | [email protected] | 132 | [email protected] |
133 | [email protected] "D" | 133 | [email protected] "D" |
134 | TUPLE_FIELD_DEF_[email protected] | 134 | [email protected] |
135 | [email protected] "(" | 135 | [email protected] "(" |
136 | TUPLE_FIELD_DEF@164..167 | 136 | [email protected] |
137 | [email protected] | 137 | [email protected] |
138 | [email protected] | 138 | [email protected] |
139 | [email protected] | 139 | [email protected] |
@@ -146,7 +146,7 @@ [email protected] | |||
146 | [email protected] | 146 | [email protected] |
147 | [email protected] | 147 | [email protected] |
148 | [email protected] "E" | 148 | [email protected] "E" |
149 | TUPLE_FIELD_DEF_[email protected] | 149 | [email protected] |
150 | [email protected] "(" | 150 | [email protected] "(" |
151 | [email protected] ")" | 151 | [email protected] ")" |
152 | [email protected] "," | 152 | [email protected] "," |
diff --git a/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast index ea54651b7..2aa075993 100644 --- a/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast +++ b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast | |||
@@ -1571,10 +1571,10 @@ [email protected] | |||
1571 | [email protected] "\'union" | 1571 | [email protected] "\'union" |
1572 | [email protected] ">" | 1572 | [email protected] ">" |
1573 | [email protected] " " | 1573 | [email protected] " " |
1574 | RECORD_FIELD_DEF_[email protected] | 1574 | [email protected] |
1575 | [email protected] "{" | 1575 | [email protected] "{" |
1576 | [email protected] " " | 1576 | [email protected] " " |
1577 | RECORD_FIELD_DEF@2873..2901 | 1577 | [email protected] |
1578 | [email protected] | 1578 | [email protected] |
1579 | [email protected] "union" | 1579 | [email protected] "union" |
1580 | [email protected] ":" | 1580 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rast b/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rast index 5640bae0a..0f0138c86 100644 --- a/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rast +++ b/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rast | |||
@@ -5,10 +5,10 @@ [email protected] | |||
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S" | 6 | [email protected] "S" |
7 | [email protected] " " | 7 | [email protected] " " |
8 | RECORD_FIELD_DEF_[email protected] | 8 | [email protected] |
9 | [email protected] "{" | 9 | [email protected] "{" |
10 | [email protected] "\n " | 10 | [email protected] "\n " |
11 | RECORD_FIELD_DEF@15..25 | 11 | [email protected] |
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "r#foo" | 13 | [email protected] "r#foo" |
14 | [email protected] ":" | 14 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast index 1c5545b6d..9c2ea3754 100644 --- a/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast +++ b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast | |||
@@ -7,10 +7,10 @@ [email protected] | |||
7 | [email protected] | 7 | [email protected] |
8 | [email protected] "Repr" | 8 | [email protected] "Repr" |
9 | [email protected] " " | 9 | [email protected] " " |
10 | RECORD_FIELD_DEF_[email protected] | 10 | [email protected] |
11 | [email protected] "{" | 11 | [email protected] "{" |
12 | [email protected] " " | 12 | [email protected] " " |
13 | RECORD_FIELD_DEF@76..88 | 13 | [email protected] |
14 | [email protected] | 14 | [email protected] |
15 | [email protected] "raw" | 15 | [email protected] "raw" |
16 | [email protected] ":" | 16 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast b/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast index 29a5d48e6..fcf605ec8 100644 --- a/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast +++ b/crates/ra_syntax/test_data/parser/ok/0047_minus_in_inner_pattern.rast | |||
@@ -268,9 +268,9 @@ [email protected] | |||
268 | [email protected] | 268 | [email protected] |
269 | [email protected] | 269 | [email protected] |
270 | [email protected] "B" | 270 | [email protected] "B" |
271 | TUPLE_FIELD_DEF_[email protected] | 271 | [email protected] |
272 | [email protected] "(" | 272 | [email protected] "(" |
273 | TUPLE_FIELD_DEF@358..360 | 273 | [email protected] |
274 | [email protected] | 274 | [email protected] |
275 | [email protected] | 275 | [email protected] |
276 | [email protected] | 276 | [email protected] |
@@ -278,7 +278,7 @@ [email protected] | |||
278 | [email protected] "i8" | 278 | [email protected] "i8" |
279 | [email protected] "," | 279 | [email protected] "," |
280 | [email protected] " " | 280 | [email protected] " " |
281 | TUPLE_FIELD_DEF@362..364 | 281 | [email protected] |
282 | [email protected] | 282 | [email protected] |
283 | [email protected] | 283 | [email protected] |
284 | [email protected] | 284 | [email protected] |