diff options
Diffstat (limited to 'crates/ra_syntax')
277 files changed, 1493 insertions, 1498 deletions
diff --git a/crates/ra_syntax/Cargo.toml b/crates/ra_syntax/Cargo.toml index 670f04578..fc4d7aa04 100644 --- a/crates/ra_syntax/Cargo.toml +++ b/crates/ra_syntax/Cargo.toml | |||
@@ -13,7 +13,7 @@ doctest = false | |||
13 | [dependencies] | 13 | [dependencies] |
14 | itertools = "0.9.0" | 14 | itertools = "0.9.0" |
15 | rowan = "0.10.0" | 15 | rowan = "0.10.0" |
16 | rustc_lexer = { version = "669.0.0", package = "rustc-ap-rustc_lexer" } | 16 | rustc_lexer = { version = "671.0.0", package = "rustc-ap-rustc_lexer" } |
17 | rustc-hash = "1.1.0" | 17 | rustc-hash = "1.1.0" |
18 | arrayvec = "0.5.1" | 18 | arrayvec = "0.5.1" |
19 | once_cell = "1.3.1" | 19 | once_cell = "1.3.1" |
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs index c65c485cb..fd426ece9 100644 --- a/crates/ra_syntax/src/ast.rs +++ b/crates/ra_syntax/src/ast.rs | |||
@@ -139,7 +139,7 @@ fn test_doc_comment_of_statics() { | |||
139 | ) | 139 | ) |
140 | .ok() | 140 | .ok() |
141 | .unwrap(); | 141 | .unwrap(); |
142 | let st = file.syntax().descendants().find_map(StaticDef::cast).unwrap(); | 142 | let st = file.syntax().descendants().find_map(Static::cast).unwrap(); |
143 | assert_eq!("Number of levels", st.doc_comment_text().unwrap()); | 143 | assert_eq!("Number of levels", st.doc_comment_text().unwrap()); |
144 | } | 144 | } |
145 | 145 | ||
@@ -235,7 +235,7 @@ fn test_comments_preserve_trailing_whitespace() { | |||
235 | ) | 235 | ) |
236 | .ok() | 236 | .ok() |
237 | .unwrap(); | 237 | .unwrap(); |
238 | let def = file.syntax().descendants().find_map(StructDef::cast).unwrap(); | 238 | let def = file.syntax().descendants().find_map(Struct::cast).unwrap(); |
239 | assert_eq!( | 239 | assert_eq!( |
240 | "Representation of a Realm. \nIn the specification these are called Realm Records.", | 240 | "Representation of a Realm. \nIn the specification these are called Realm Records.", |
241 | def.doc_comment_text().unwrap() | 241 | def.doc_comment_text().unwrap() |
@@ -286,7 +286,7 @@ where | |||
286 | let mut bounds = pred.type_bound_list().unwrap().bounds(); | 286 | let mut bounds = pred.type_bound_list().unwrap().bounds(); |
287 | 287 | ||
288 | assert!(pred.for_token().is_none()); | 288 | assert!(pred.for_token().is_none()); |
289 | assert!(pred.type_param_list().is_none()); | 289 | assert!(pred.generic_param_list().is_none()); |
290 | assert_eq!("T", pred.type_ref().unwrap().syntax().text().to_string()); | 290 | assert_eq!("T", pred.type_ref().unwrap().syntax().text().to_string()); |
291 | assert_bound("Clone", bounds.next()); | 291 | assert_bound("Clone", bounds.next()); |
292 | assert_bound("Copy", bounds.next()); | 292 | assert_bound("Copy", bounds.next()); |
@@ -325,7 +325,7 @@ where | |||
325 | let mut bounds = pred.type_bound_list().unwrap().bounds(); | 325 | let mut bounds = pred.type_bound_list().unwrap().bounds(); |
326 | 326 | ||
327 | assert!(pred.for_token().is_some()); | 327 | assert!(pred.for_token().is_some()); |
328 | assert_eq!("<'a>", pred.type_param_list().unwrap().syntax().text().to_string()); | 328 | assert_eq!("<'a>", pred.generic_param_list().unwrap().syntax().text().to_string()); |
329 | assert_eq!("F", pred.type_ref().unwrap().syntax().text().to_string()); | 329 | assert_eq!("F", pred.type_ref().unwrap().syntax().text().to_string()); |
330 | assert_bound("Fn(&'a str)", bounds.next()); | 330 | assert_bound("Fn(&'a str)", bounds.next()); |
331 | } | 331 | } |
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs index 6ebe10ff6..8d3e42f25 100644 --- a/crates/ra_syntax/src/ast/edit.rs +++ b/crates/ra_syntax/src/ast/edit.rs | |||
@@ -29,9 +29,9 @@ impl ast::BinExpr { | |||
29 | } | 29 | } |
30 | } | 30 | } |
31 | 31 | ||
32 | impl ast::FnDef { | 32 | impl ast::Fn { |
33 | #[must_use] | 33 | #[must_use] |
34 | pub fn with_body(&self, body: ast::BlockExpr) -> ast::FnDef { | 34 | pub fn with_body(&self, body: ast::BlockExpr) -> ast::Fn { |
35 | let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new(); | 35 | let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new(); |
36 | let old_body_or_semi: SyntaxElement = if let Some(old_body) = self.body() { | 36 | let old_body_or_semi: SyntaxElement = if let Some(old_body) = self.body() { |
37 | old_body.syntax().clone().into() | 37 | old_body.syntax().clone().into() |
@@ -116,18 +116,18 @@ impl ast::AssocItemList { | |||
116 | } | 116 | } |
117 | } | 117 | } |
118 | 118 | ||
119 | impl ast::RecordFieldList { | 119 | impl ast::RecordExprFieldList { |
120 | #[must_use] | 120 | #[must_use] |
121 | pub fn append_field(&self, field: &ast::RecordField) -> ast::RecordFieldList { | 121 | pub fn append_field(&self, field: &ast::RecordExprField) -> ast::RecordExprFieldList { |
122 | self.insert_field(InsertPosition::Last, field) | 122 | self.insert_field(InsertPosition::Last, field) |
123 | } | 123 | } |
124 | 124 | ||
125 | #[must_use] | 125 | #[must_use] |
126 | pub fn insert_field( | 126 | pub fn insert_field( |
127 | &self, | 127 | &self, |
128 | position: InsertPosition<&'_ ast::RecordField>, | 128 | position: InsertPosition<&'_ ast::RecordExprField>, |
129 | field: &ast::RecordField, | 129 | field: &ast::RecordExprField, |
130 | ) -> ast::RecordFieldList { | 130 | ) -> ast::RecordExprFieldList { |
131 | let is_multiline = self.syntax().text().contains_char('\n'); | 131 | let is_multiline = self.syntax().text().contains_char('\n'); |
132 | let ws; | 132 | let ws; |
133 | let space = if is_multiline { | 133 | let space = if is_multiline { |
@@ -192,9 +192,9 @@ impl ast::RecordFieldList { | |||
192 | } | 192 | } |
193 | } | 193 | } |
194 | 194 | ||
195 | impl ast::TypeAliasDef { | 195 | impl ast::TypeAlias { |
196 | #[must_use] | 196 | #[must_use] |
197 | pub fn remove_bounds(&self) -> ast::TypeAliasDef { | 197 | pub fn remove_bounds(&self) -> ast::TypeAlias { |
198 | let colon = match self.colon_token() { | 198 | let colon = match self.colon_token() { |
199 | Some(it) => it, | 199 | Some(it) => it, |
200 | None => return self.clone(), | 200 | None => return self.clone(), |
diff --git a/crates/ra_syntax/src/ast/expr_ext.rs b/crates/ra_syntax/src/ast/expr_ext.rs index 69c85c809..f5ba87223 100644 --- a/crates/ra_syntax/src/ast/expr_ext.rs +++ b/crates/ra_syntax/src/ast/expr_ext.rs | |||
@@ -333,13 +333,12 @@ impl ast::Literal { | |||
333 | 333 | ||
334 | match token.kind() { | 334 | match token.kind() { |
335 | INT_NUMBER => { | 335 | INT_NUMBER => { |
336 | // FYI: there was a bug here previously, thus an if statement bellow is necessary. | 336 | // FYI: there was a bug here previously, thus the if statement below is necessary. |
337 | // The lexer treats e.g. `1f64` as an integer literal. See | 337 | // The lexer treats e.g. `1f64` as an integer literal. See |
338 | // https://github.com/rust-analyzer/rust-analyzer/issues/1592 | 338 | // https://github.com/rust-analyzer/rust-analyzer/issues/1592 |
339 | // and the comments on the linked PR. | 339 | // and the comments on the linked PR. |
340 | 340 | ||
341 | let text = token.text(); | 341 | let text = token.text(); |
342 | |||
343 | if let suffix @ Some(_) = Self::find_suffix(&text, &FLOAT_SUFFIXES) { | 342 | if let suffix @ Some(_) = Self::find_suffix(&text, &FLOAT_SUFFIXES) { |
344 | LiteralKind::FloatNumber { suffix } | 343 | LiteralKind::FloatNumber { suffix } |
345 | } else { | 344 | } else { |
@@ -401,7 +400,7 @@ impl ast::BlockExpr { | |||
401 | Some(it) => it, | 400 | Some(it) => it, |
402 | None => return true, | 401 | None => return true, |
403 | }; | 402 | }; |
404 | !matches!(parent.kind(), FN_DEF | IF_EXPR | WHILE_EXPR | LOOP_EXPR | EFFECT_EXPR) | 403 | !matches!(parent.kind(), FN | IF_EXPR | WHILE_EXPR | LOOP_EXPR | EFFECT_EXPR) |
405 | } | 404 | } |
406 | } | 405 | } |
407 | 406 | ||
@@ -412,8 +411,8 @@ fn test_literal_with_attr() { | |||
412 | assert_eq!(lit.token().text(), r#""Hello""#); | 411 | assert_eq!(lit.token().text(), r#""Hello""#); |
413 | } | 412 | } |
414 | 413 | ||
415 | impl ast::RecordField { | 414 | impl ast::RecordExprField { |
416 | pub fn parent_record_lit(&self) -> ast::RecordLit { | 415 | pub fn parent_record_lit(&self) -> ast::RecordExpr { |
417 | self.syntax().ancestors().find_map(ast::RecordLit::cast).unwrap() | 416 | self.syntax().ancestors().find_map(ast::RecordExpr::cast).unwrap() |
418 | } | 417 | } |
419 | } | 418 | } |
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index be657699f..4306efe13 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -24,36 +24,38 @@ impl Attr { | |||
24 | pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) } | 24 | pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) } |
25 | pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } | 25 | pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } |
26 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } | 26 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } |
27 | pub fn input(&self) -> Option<AttrInput> { support::child(&self.syntax) } | 27 | pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) } |
28 | pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) } | ||
28 | pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } | 29 | pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } |
29 | } | 30 | } |
30 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 31 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
31 | pub struct ConstDef { | 32 | pub struct Const { |
32 | pub(crate) syntax: SyntaxNode, | 33 | pub(crate) syntax: SyntaxNode, |
33 | } | 34 | } |
34 | impl ast::AttrsOwner for ConstDef {} | 35 | impl ast::AttrsOwner for Const {} |
35 | impl ast::NameOwner for ConstDef {} | 36 | impl ast::NameOwner for Const {} |
36 | impl ast::VisibilityOwner for ConstDef {} | 37 | impl ast::VisibilityOwner for Const {} |
37 | impl ast::TypeAscriptionOwner for ConstDef {} | 38 | impl Const { |
38 | impl ConstDef { | ||
39 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } | 39 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } |
40 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } | 40 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } |
41 | pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) } | ||
41 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } | 42 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } |
43 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } | ||
42 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } | 44 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } |
43 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } | 45 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } |
44 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } | 46 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } |
45 | } | 47 | } |
46 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 48 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
47 | pub struct EnumDef { | 49 | pub struct Enum { |
48 | pub(crate) syntax: SyntaxNode, | 50 | pub(crate) syntax: SyntaxNode, |
49 | } | 51 | } |
50 | impl ast::AttrsOwner for EnumDef {} | 52 | impl ast::AttrsOwner for Enum {} |
51 | impl ast::NameOwner for EnumDef {} | 53 | impl ast::NameOwner for Enum {} |
52 | impl ast::VisibilityOwner for EnumDef {} | 54 | impl ast::VisibilityOwner for Enum {} |
53 | impl ast::TypeParamsOwner for EnumDef {} | 55 | impl ast::GenericParamsOwner for Enum {} |
54 | impl EnumDef { | 56 | impl Enum { |
55 | pub fn enum_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![enum]) } | 57 | pub fn enum_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![enum]) } |
56 | pub fn variant_list(&self) -> Option<EnumVariantList> { support::child(&self.syntax) } | 58 | pub fn variant_list(&self) -> Option<VariantList> { support::child(&self.syntax) } |
57 | } | 59 | } |
58 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 60 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
59 | pub struct ExternBlock { | 61 | pub struct ExternBlock { |
@@ -79,19 +81,19 @@ impl ExternCrate { | |||
79 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } | 81 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } |
80 | } | 82 | } |
81 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 83 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
82 | pub struct FnDef { | 84 | pub struct Fn { |
83 | pub(crate) syntax: SyntaxNode, | 85 | pub(crate) syntax: SyntaxNode, |
84 | } | 86 | } |
85 | impl ast::AttrsOwner for FnDef {} | 87 | impl ast::AttrsOwner for Fn {} |
86 | impl ast::NameOwner for FnDef {} | 88 | impl ast::NameOwner for Fn {} |
87 | impl ast::VisibilityOwner for FnDef {} | 89 | impl ast::VisibilityOwner for Fn {} |
88 | impl ast::TypeParamsOwner for FnDef {} | 90 | impl ast::GenericParamsOwner for Fn {} |
89 | impl FnDef { | 91 | impl Fn { |
90 | pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } | ||
91 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } | ||
92 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } | 92 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } |
93 | pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) } | 93 | pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) } |
94 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } | ||
94 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) } | 95 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) } |
96 | pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) } | ||
95 | pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) } | 97 | pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) } |
96 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } | 98 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } |
97 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } | 99 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } |
@@ -99,17 +101,18 @@ impl FnDef { | |||
99 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } | 101 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } |
100 | } | 102 | } |
101 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 103 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
102 | pub struct ImplDef { | 104 | pub struct Impl { |
103 | pub(crate) syntax: SyntaxNode, | 105 | pub(crate) syntax: SyntaxNode, |
104 | } | 106 | } |
105 | impl ast::AttrsOwner for ImplDef {} | 107 | impl ast::AttrsOwner for Impl {} |
106 | impl ast::VisibilityOwner for ImplDef {} | 108 | impl ast::VisibilityOwner for Impl {} |
107 | impl ast::TypeParamsOwner for ImplDef {} | 109 | impl ast::GenericParamsOwner for Impl {} |
108 | impl ImplDef { | 110 | impl Impl { |
109 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } | ||
110 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } | 111 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } |
111 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) } | 112 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) } |
112 | pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) } | 113 | pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) } |
114 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } | ||
115 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | ||
113 | pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) } | 116 | pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) } |
114 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } | 117 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } |
115 | pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) } | 118 | pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) } |
@@ -139,78 +142,76 @@ impl Module { | |||
139 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } | 142 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } |
140 | } | 143 | } |
141 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 144 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
142 | pub struct StaticDef { | 145 | pub struct Static { |
143 | pub(crate) syntax: SyntaxNode, | 146 | pub(crate) syntax: SyntaxNode, |
144 | } | 147 | } |
145 | impl ast::AttrsOwner for StaticDef {} | 148 | impl ast::AttrsOwner for Static {} |
146 | impl ast::NameOwner for StaticDef {} | 149 | impl ast::NameOwner for Static {} |
147 | impl ast::VisibilityOwner for StaticDef {} | 150 | impl ast::VisibilityOwner for Static {} |
148 | impl ast::TypeAscriptionOwner for StaticDef {} | 151 | impl Static { |
149 | impl StaticDef { | ||
150 | pub fn static_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![static]) } | 152 | pub fn static_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![static]) } |
151 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } | 153 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } |
152 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } | 154 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } |
155 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } | ||
153 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } | 156 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } |
154 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } | 157 | pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) } |
155 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } | 158 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } |
156 | } | 159 | } |
157 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 160 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
158 | pub struct StructDef { | 161 | pub struct Struct { |
159 | pub(crate) syntax: SyntaxNode, | 162 | pub(crate) syntax: SyntaxNode, |
160 | } | 163 | } |
161 | impl ast::AttrsOwner for StructDef {} | 164 | impl ast::AttrsOwner for Struct {} |
162 | impl ast::NameOwner for StructDef {} | 165 | impl ast::NameOwner for Struct {} |
163 | impl ast::VisibilityOwner for StructDef {} | 166 | impl ast::VisibilityOwner for Struct {} |
164 | impl ast::TypeParamsOwner for StructDef {} | 167 | impl ast::GenericParamsOwner for Struct {} |
165 | impl StructDef { | 168 | impl Struct { |
166 | pub fn struct_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![struct]) } | 169 | 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![;]) } | 170 | 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) } | 171 | pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) } |
169 | } | 172 | } |
170 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 173 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
171 | pub struct TraitDef { | 174 | pub struct Trait { |
172 | pub(crate) syntax: SyntaxNode, | 175 | pub(crate) syntax: SyntaxNode, |
173 | } | 176 | } |
174 | impl ast::AttrsOwner for TraitDef {} | 177 | impl ast::AttrsOwner for Trait {} |
175 | impl ast::NameOwner for TraitDef {} | 178 | impl ast::NameOwner for Trait {} |
176 | impl ast::VisibilityOwner for TraitDef {} | 179 | impl ast::VisibilityOwner for Trait {} |
177 | impl ast::TypeParamsOwner for TraitDef {} | 180 | impl ast::GenericParamsOwner for Trait {} |
178 | impl ast::TypeBoundsOwner for TraitDef {} | 181 | impl ast::TypeBoundsOwner for Trait {} |
179 | impl TraitDef { | 182 | impl Trait { |
180 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) } | 183 | pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) } |
181 | pub fn auto_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![auto]) } | 184 | pub fn auto_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![auto]) } |
182 | pub fn trait_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![trait]) } | 185 | pub fn trait_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![trait]) } |
183 | pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) } | 186 | pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) } |
184 | } | 187 | } |
185 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 188 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
186 | pub struct TypeAliasDef { | 189 | pub struct TypeAlias { |
187 | pub(crate) syntax: SyntaxNode, | 190 | pub(crate) syntax: SyntaxNode, |
188 | } | 191 | } |
189 | impl ast::AttrsOwner for TypeAliasDef {} | 192 | impl ast::AttrsOwner for TypeAlias {} |
190 | impl ast::NameOwner for TypeAliasDef {} | 193 | impl ast::NameOwner for TypeAlias {} |
191 | impl ast::VisibilityOwner for TypeAliasDef {} | 194 | impl ast::VisibilityOwner for TypeAlias {} |
192 | impl ast::TypeParamsOwner for TypeAliasDef {} | 195 | impl ast::GenericParamsOwner for TypeAlias {} |
193 | impl ast::TypeBoundsOwner for TypeAliasDef {} | 196 | impl ast::TypeBoundsOwner for TypeAlias {} |
194 | impl TypeAliasDef { | 197 | impl TypeAlias { |
195 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } | 198 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } |
196 | pub fn type_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![type]) } | 199 | pub fn type_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![type]) } |
197 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } | 200 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } |
198 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 201 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
199 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } | 202 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } |
200 | } | 203 | } |
201 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 204 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
202 | pub struct UnionDef { | 205 | pub struct Union { |
203 | pub(crate) syntax: SyntaxNode, | 206 | pub(crate) syntax: SyntaxNode, |
204 | } | 207 | } |
205 | impl ast::AttrsOwner for UnionDef {} | 208 | impl ast::AttrsOwner for Union {} |
206 | impl ast::NameOwner for UnionDef {} | 209 | impl ast::NameOwner for Union {} |
207 | impl ast::VisibilityOwner for UnionDef {} | 210 | impl ast::VisibilityOwner for Union {} |
208 | impl ast::TypeParamsOwner for UnionDef {} | 211 | impl ast::GenericParamsOwner for Union {} |
209 | impl UnionDef { | 212 | impl Union { |
210 | pub fn union_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![union]) } | 213 | pub fn union_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![union]) } |
211 | pub fn record_field_def_list(&self) -> Option<RecordFieldDefList> { | 214 | pub fn record_field_list(&self) -> Option<RecordFieldList> { support::child(&self.syntax) } |
212 | support::child(&self.syntax) | ||
213 | } | ||
214 | } | 215 | } |
215 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 216 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
216 | pub struct Use { | 217 | pub struct Use { |
@@ -303,16 +304,16 @@ impl UseTreeList { | |||
303 | pub struct Abi { | 304 | pub struct Abi { |
304 | pub(crate) syntax: SyntaxNode, | 305 | pub(crate) syntax: SyntaxNode, |
305 | } | 306 | } |
306 | impl Abi {} | 307 | impl Abi { |
308 | pub fn extern_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![extern]) } | ||
309 | } | ||
307 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 310 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
308 | pub struct TypeParamList { | 311 | pub struct GenericParamList { |
309 | pub(crate) syntax: SyntaxNode, | 312 | pub(crate) syntax: SyntaxNode, |
310 | } | 313 | } |
311 | impl TypeParamList { | 314 | impl GenericParamList { |
312 | pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) } | 315 | pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) } |
313 | pub fn type_params(&self) -> AstChildren<TypeParam> { support::children(&self.syntax) } | 316 | pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) } |
314 | pub fn lifetime_params(&self) -> AstChildren<LifetimeParam> { support::children(&self.syntax) } | ||
315 | pub fn const_params(&self) -> AstChildren<ConstParam> { support::children(&self.syntax) } | ||
316 | pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) } | 317 | pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) } |
317 | } | 318 | } |
318 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 319 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -322,6 +323,7 @@ pub struct ParamList { | |||
322 | impl ParamList { | 323 | impl ParamList { |
323 | pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) } | 324 | pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) } |
324 | pub fn self_param(&self) -> Option<SelfParam> { support::child(&self.syntax) } | 325 | pub fn self_param(&self) -> Option<SelfParam> { support::child(&self.syntax) } |
326 | pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) } | ||
325 | pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) } | 327 | pub fn params(&self) -> AstChildren<Param> { support::children(&self.syntax) } |
326 | pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } | 328 | pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } |
327 | } | 329 | } |
@@ -331,7 +333,7 @@ pub struct RetType { | |||
331 | } | 333 | } |
332 | impl RetType { | 334 | impl RetType { |
333 | pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![->]) } | 335 | pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![->]) } |
334 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 336 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
335 | } | 337 | } |
336 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 338 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
337 | pub struct WhereClause { | 339 | pub struct WhereClause { |
@@ -355,80 +357,167 @@ impl BlockExpr { | |||
355 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } | 357 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } |
356 | } | 358 | } |
357 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 359 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
358 | pub struct RecordFieldDefList { | 360 | pub struct SelfParam { |
361 | pub(crate) syntax: SyntaxNode, | ||
362 | } | ||
363 | impl ast::AttrsOwner for SelfParam {} | ||
364 | impl SelfParam { | ||
365 | pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) } | ||
366 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | ||
367 | support::token(&self.syntax, T![lifetime]) | ||
368 | } | ||
369 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } | ||
370 | pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) } | ||
371 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } | ||
372 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } | ||
373 | } | ||
374 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
375 | pub struct Param { | ||
376 | pub(crate) syntax: SyntaxNode, | ||
377 | } | ||
378 | impl ast::AttrsOwner for Param {} | ||
379 | impl Param { | ||
380 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | ||
381 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } | ||
382 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } | ||
383 | pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![...]) } | ||
384 | } | ||
385 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
386 | pub struct TypeBoundList { | ||
387 | pub(crate) syntax: SyntaxNode, | ||
388 | } | ||
389 | impl TypeBoundList { | ||
390 | pub fn bounds(&self) -> AstChildren<TypeBound> { support::children(&self.syntax) } | ||
391 | } | ||
392 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
393 | pub struct RecordFieldList { | ||
359 | pub(crate) syntax: SyntaxNode, | 394 | pub(crate) syntax: SyntaxNode, |
360 | } | 395 | } |
361 | impl RecordFieldDefList { | 396 | impl RecordFieldList { |
362 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } | 397 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } |
363 | pub fn fields(&self) -> AstChildren<RecordFieldDef> { support::children(&self.syntax) } | 398 | pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) } |
364 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } | 399 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } |
365 | } | 400 | } |
366 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 401 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
367 | pub struct TupleFieldDefList { | 402 | pub struct TupleFieldList { |
368 | pub(crate) syntax: SyntaxNode, | 403 | pub(crate) syntax: SyntaxNode, |
369 | } | 404 | } |
370 | impl TupleFieldDefList { | 405 | impl TupleFieldList { |
371 | pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) } | 406 | pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) } |
372 | pub fn fields(&self) -> AstChildren<TupleFieldDef> { support::children(&self.syntax) } | 407 | pub fn fields(&self) -> AstChildren<TupleField> { support::children(&self.syntax) } |
373 | pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } | 408 | pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } |
374 | } | 409 | } |
375 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 410 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
376 | pub struct RecordFieldDef { | 411 | pub struct RecordField { |
377 | pub(crate) syntax: SyntaxNode, | 412 | pub(crate) syntax: SyntaxNode, |
378 | } | 413 | } |
379 | impl ast::AttrsOwner for RecordFieldDef {} | 414 | impl ast::AttrsOwner for RecordField {} |
380 | impl ast::NameOwner for RecordFieldDef {} | 415 | impl ast::NameOwner for RecordField {} |
381 | impl ast::VisibilityOwner for RecordFieldDef {} | 416 | impl ast::VisibilityOwner for RecordField {} |
382 | impl ast::TypeAscriptionOwner for RecordFieldDef {} | 417 | impl RecordField { |
383 | impl RecordFieldDef { | ||
384 | 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![:]) } |
419 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } | ||
385 | } | 420 | } |
386 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 421 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
387 | pub struct TupleFieldDef { | 422 | pub struct TupleField { |
388 | pub(crate) syntax: SyntaxNode, | 423 | pub(crate) syntax: SyntaxNode, |
389 | } | 424 | } |
390 | impl ast::AttrsOwner for TupleFieldDef {} | 425 | impl ast::AttrsOwner for TupleField {} |
391 | impl ast::NameOwner for TupleFieldDef {} | 426 | impl ast::VisibilityOwner for TupleField {} |
392 | impl ast::VisibilityOwner for TupleFieldDef {} | 427 | impl TupleField { |
393 | impl TupleFieldDef { | 428 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
394 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | ||
395 | } | 429 | } |
396 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 430 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
397 | pub struct EnumVariantList { | 431 | pub struct VariantList { |
398 | pub(crate) syntax: SyntaxNode, | 432 | pub(crate) syntax: SyntaxNode, |
399 | } | 433 | } |
400 | impl EnumVariantList { | 434 | impl VariantList { |
401 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } | 435 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } |
402 | pub fn variants(&self) -> AstChildren<EnumVariant> { support::children(&self.syntax) } | 436 | pub fn variants(&self) -> AstChildren<Variant> { support::children(&self.syntax) } |
403 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } | 437 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } |
404 | } | 438 | } |
405 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 439 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
406 | pub struct EnumVariant { | 440 | pub struct Variant { |
407 | pub(crate) syntax: SyntaxNode, | 441 | pub(crate) syntax: SyntaxNode, |
408 | } | 442 | } |
409 | impl ast::AttrsOwner for EnumVariant {} | 443 | impl ast::AttrsOwner for Variant {} |
410 | impl ast::NameOwner for EnumVariant {} | 444 | impl ast::NameOwner for Variant {} |
411 | impl ast::VisibilityOwner for EnumVariant {} | 445 | impl ast::VisibilityOwner for Variant {} |
412 | impl EnumVariant { | 446 | impl Variant { |
413 | pub fn field_def_list(&self) -> Option<FieldDefList> { support::child(&self.syntax) } | 447 | pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) } |
414 | 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![=]) } |
415 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 449 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
416 | } | 450 | } |
417 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 451 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
418 | pub struct TypeBoundList { | 452 | pub struct AssocItemList { |
419 | pub(crate) syntax: SyntaxNode, | 453 | pub(crate) syntax: SyntaxNode, |
420 | } | 454 | } |
421 | impl TypeBoundList { | 455 | impl ast::AttrsOwner for AssocItemList {} |
422 | pub fn bounds(&self) -> AstChildren<TypeBound> { support::children(&self.syntax) } | 456 | impl AssocItemList { |
457 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } | ||
458 | pub fn assoc_items(&self) -> AstChildren<AssocItem> { support::children(&self.syntax) } | ||
459 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } | ||
423 | } | 460 | } |
424 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 461 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
425 | pub struct AssocItemList { | 462 | pub struct ExternItemList { |
426 | pub(crate) syntax: SyntaxNode, | 463 | pub(crate) syntax: SyntaxNode, |
427 | } | 464 | } |
428 | impl AssocItemList { | 465 | impl ast::AttrsOwner for ExternItemList {} |
466 | impl ExternItemList { | ||
467 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } | ||
468 | pub fn extern_items(&self) -> AstChildren<ExternItem> { support::children(&self.syntax) } | ||
469 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } | ||
470 | } | ||
471 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
472 | pub struct LifetimeParam { | ||
473 | pub(crate) syntax: SyntaxNode, | ||
474 | } | ||
475 | impl ast::AttrsOwner for LifetimeParam {} | ||
476 | impl LifetimeParam { | ||
477 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | ||
478 | support::token(&self.syntax, T![lifetime]) | ||
479 | } | ||
480 | } | ||
481 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
482 | pub struct TypeParam { | ||
483 | pub(crate) syntax: SyntaxNode, | ||
484 | } | ||
485 | impl ast::AttrsOwner for TypeParam {} | ||
486 | impl ast::NameOwner for TypeParam {} | ||
487 | impl ast::TypeBoundsOwner for TypeParam {} | ||
488 | impl TypeParam { | ||
489 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } | ||
490 | pub fn default_type(&self) -> Option<TypeRef> { support::child(&self.syntax) } | ||
491 | } | ||
492 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
493 | pub struct ConstParam { | ||
494 | pub(crate) syntax: SyntaxNode, | ||
495 | } | ||
496 | impl ast::AttrsOwner for ConstParam {} | ||
497 | impl ast::NameOwner for ConstParam {} | ||
498 | impl ConstParam { | ||
499 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } | ||
500 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } | ||
501 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } | ||
502 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } | ||
503 | pub fn default_val(&self) -> Option<Expr> { support::child(&self.syntax) } | ||
504 | } | ||
505 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
506 | pub struct Literal { | ||
507 | pub(crate) syntax: SyntaxNode, | ||
508 | } | ||
509 | impl Literal {} | ||
510 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
511 | pub struct TokenTree { | ||
512 | pub(crate) syntax: SyntaxNode, | ||
513 | } | ||
514 | impl TokenTree { | ||
515 | pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) } | ||
516 | pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } | ||
429 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } | 517 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } |
430 | pub fn assoc_items(&self) -> AstChildren<AssocItem> { support::children(&self.syntax) } | ||
431 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } | 518 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } |
519 | pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) } | ||
520 | pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } | ||
432 | } | 521 | } |
433 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 522 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
434 | pub struct ParenType { | 523 | pub struct ParenType { |
@@ -436,7 +525,7 @@ pub struct ParenType { | |||
436 | } | 525 | } |
437 | impl ParenType { | 526 | impl ParenType { |
438 | pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) } | 527 | pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) } |
439 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 528 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
440 | pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } | 529 | pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } |
441 | } | 530 | } |
442 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 531 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -470,7 +559,7 @@ impl PointerType { | |||
470 | pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) } | 559 | pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) } |
471 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } | 560 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } |
472 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } | 561 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } |
473 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 562 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
474 | } | 563 | } |
475 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 564 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
476 | pub struct ArrayType { | 565 | pub struct ArrayType { |
@@ -478,7 +567,7 @@ pub struct ArrayType { | |||
478 | } | 567 | } |
479 | impl ArrayType { | 568 | impl ArrayType { |
480 | pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) } | 569 | pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) } |
481 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 570 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
482 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } | 571 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } |
483 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 572 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
484 | pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } | 573 | pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } |
@@ -489,7 +578,7 @@ pub struct SliceType { | |||
489 | } | 578 | } |
490 | impl SliceType { | 579 | impl SliceType { |
491 | pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) } | 580 | pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) } |
492 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 581 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
493 | pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } | 582 | pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } |
494 | } | 583 | } |
495 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 584 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -502,7 +591,7 @@ impl ReferenceType { | |||
502 | support::token(&self.syntax, T![lifetime]) | 591 | support::token(&self.syntax, T![lifetime]) |
503 | } | 592 | } |
504 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } | 593 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } |
505 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 594 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
506 | } | 595 | } |
507 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 596 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
508 | pub struct PlaceholderType { | 597 | pub struct PlaceholderType { |
@@ -528,8 +617,8 @@ pub struct ForType { | |||
528 | } | 617 | } |
529 | impl ForType { | 618 | impl ForType { |
530 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } | 619 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } |
531 | pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) } | 620 | pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) } |
532 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 621 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
533 | } | 622 | } |
534 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 623 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
535 | pub struct ImplTraitType { | 624 | pub struct ImplTraitType { |
@@ -793,7 +882,7 @@ impl ast::AttrsOwner for CastExpr {} | |||
793 | impl CastExpr { | 882 | impl CastExpr { |
794 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 883 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
795 | pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) } | 884 | pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) } |
796 | pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } | 885 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } |
797 | } | 886 | } |
798 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 887 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
799 | pub struct RefExpr { | 888 | pub struct RefExpr { |
@@ -837,11 +926,6 @@ pub struct BinExpr { | |||
837 | impl ast::AttrsOwner for BinExpr {} | 926 | impl ast::AttrsOwner for BinExpr {} |
838 | impl BinExpr {} | 927 | impl BinExpr {} |
839 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 928 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
840 | pub struct Literal { | ||
841 | pub(crate) syntax: SyntaxNode, | ||
842 | } | ||
843 | impl Literal {} | ||
844 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
845 | pub struct MatchExpr { | 929 | pub struct MatchExpr { |
846 | pub(crate) syntax: SyntaxNode, | 930 | pub(crate) syntax: SyntaxNode, |
847 | } | 931 | } |
@@ -880,30 +964,32 @@ impl MatchGuard { | |||
880 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 964 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
881 | } | 965 | } |
882 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 966 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
883 | pub struct RecordLit { | 967 | pub struct RecordExpr { |
884 | pub(crate) syntax: SyntaxNode, | 968 | pub(crate) syntax: SyntaxNode, |
885 | } | 969 | } |
886 | impl RecordLit { | 970 | impl RecordExpr { |
887 | pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } | 971 | pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } |
888 | pub fn record_field_list(&self) -> Option<RecordFieldList> { support::child(&self.syntax) } | 972 | pub fn record_expr_field_list(&self) -> Option<RecordExprFieldList> { |
973 | support::child(&self.syntax) | ||
974 | } | ||
889 | } | 975 | } |
890 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 976 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
891 | pub struct RecordFieldList { | 977 | pub struct RecordExprFieldList { |
892 | pub(crate) syntax: SyntaxNode, | 978 | pub(crate) syntax: SyntaxNode, |
893 | } | 979 | } |
894 | impl RecordFieldList { | 980 | impl RecordExprFieldList { |
895 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } | 981 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } |
896 | pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) } | 982 | pub fn fields(&self) -> AstChildren<RecordExprField> { support::children(&self.syntax) } |
897 | pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) } | 983 | pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) } |
898 | pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) } | 984 | pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) } |
899 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } | 985 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } |
900 | } | 986 | } |
901 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 987 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
902 | pub struct RecordField { | 988 | pub struct RecordExprField { |
903 | pub(crate) syntax: SyntaxNode, | 989 | pub(crate) syntax: SyntaxNode, |
904 | } | 990 | } |
905 | impl ast::AttrsOwner for RecordField {} | 991 | impl ast::AttrsOwner for RecordExprField {} |
906 | impl RecordField { | 992 | impl RecordExprField { |
907 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } | 993 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } |
908 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } | 994 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } |
909 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 995 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
@@ -1058,18 +1144,6 @@ impl TuplePat { | |||
1058 | pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } | 1144 | pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } |
1059 | } | 1145 | } |
1060 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1146 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1061 | pub struct TokenTree { | ||
1062 | pub(crate) syntax: SyntaxNode, | ||
1063 | } | ||
1064 | impl TokenTree { | ||
1065 | pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) } | ||
1066 | pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } | ||
1067 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } | ||
1068 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } | ||
1069 | pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) } | ||
1070 | pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } | ||
1071 | } | ||
1072 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
1073 | pub struct MacroDef { | 1147 | pub struct MacroDef { |
1074 | pub(crate) syntax: SyntaxNode, | 1148 | pub(crate) syntax: SyntaxNode, |
1075 | } | 1149 | } |
@@ -1092,40 +1166,6 @@ impl MacroStmts { | |||
1092 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 1166 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
1093 | } | 1167 | } |
1094 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1168 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1095 | pub struct TypeParam { | ||
1096 | pub(crate) syntax: SyntaxNode, | ||
1097 | } | ||
1098 | impl ast::AttrsOwner for TypeParam {} | ||
1099 | impl ast::NameOwner for TypeParam {} | ||
1100 | impl ast::TypeBoundsOwner for TypeParam {} | ||
1101 | impl TypeParam { | ||
1102 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } | ||
1103 | pub fn default_type(&self) -> Option<TypeRef> { support::child(&self.syntax) } | ||
1104 | } | ||
1105 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
1106 | pub struct LifetimeParam { | ||
1107 | pub(crate) syntax: SyntaxNode, | ||
1108 | } | ||
1109 | impl ast::AttrsOwner for LifetimeParam {} | ||
1110 | impl LifetimeParam { | ||
1111 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | ||
1112 | support::token(&self.syntax, T![lifetime]) | ||
1113 | } | ||
1114 | } | ||
1115 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
1116 | pub struct ConstParam { | ||
1117 | pub(crate) syntax: SyntaxNode, | ||
1118 | } | ||
1119 | impl ast::AttrsOwner for ConstParam {} | ||
1120 | impl ast::NameOwner for ConstParam {} | ||
1121 | impl ast::TypeAscriptionOwner for ConstParam {} | ||
1122 | impl ConstParam { | ||
1123 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } | ||
1124 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } | ||
1125 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } | ||
1126 | pub fn default_val(&self) -> Option<Expr> { support::child(&self.syntax) } | ||
1127 | } | ||
1128 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
1129 | pub struct TypeBound { | 1169 | pub struct TypeBound { |
1130 | pub(crate) syntax: SyntaxNode, | 1170 | pub(crate) syntax: SyntaxNode, |
1131 | } | 1171 | } |
@@ -1143,7 +1183,7 @@ pub struct WherePred { | |||
1143 | impl ast::TypeBoundsOwner for WherePred {} | 1183 | impl ast::TypeBoundsOwner for WherePred {} |
1144 | impl WherePred { | 1184 | impl WherePred { |
1145 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } | 1185 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } |
1146 | pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) } | 1186 | pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) } |
1147 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | 1187 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { |
1148 | support::token(&self.syntax, T![lifetime]) | 1188 | support::token(&self.syntax, T![lifetime]) |
1149 | } | 1189 | } |
@@ -1163,42 +1203,16 @@ pub struct LetStmt { | |||
1163 | pub(crate) syntax: SyntaxNode, | 1203 | pub(crate) syntax: SyntaxNode, |
1164 | } | 1204 | } |
1165 | impl ast::AttrsOwner for LetStmt {} | 1205 | impl ast::AttrsOwner for LetStmt {} |
1166 | impl ast::TypeAscriptionOwner for LetStmt {} | ||
1167 | impl LetStmt { | 1206 | impl LetStmt { |
1168 | pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) } | 1207 | pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) } |
1169 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | 1208 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } |
1170 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } | 1209 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } |
1210 | pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) } | ||
1171 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } | 1211 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } |
1172 | pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) } | 1212 | pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) } |
1173 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } | 1213 | pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } |
1174 | } | 1214 | } |
1175 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1215 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1176 | pub struct SelfParam { | ||
1177 | pub(crate) syntax: SyntaxNode, | ||
1178 | } | ||
1179 | impl ast::AttrsOwner for SelfParam {} | ||
1180 | impl ast::TypeAscriptionOwner for SelfParam {} | ||
1181 | impl SelfParam { | ||
1182 | pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) } | ||
1183 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | ||
1184 | support::token(&self.syntax, T![lifetime]) | ||
1185 | } | ||
1186 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } | ||
1187 | pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) } | ||
1188 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } | ||
1189 | } | ||
1190 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
1191 | pub struct Param { | ||
1192 | pub(crate) syntax: SyntaxNode, | ||
1193 | } | ||
1194 | impl ast::AttrsOwner for Param {} | ||
1195 | impl ast::TypeAscriptionOwner for Param {} | ||
1196 | impl Param { | ||
1197 | pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } | ||
1198 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } | ||
1199 | pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![...]) } | ||
1200 | } | ||
1201 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
1202 | pub struct PathSegment { | 1216 | pub struct PathSegment { |
1203 | pub(crate) syntax: SyntaxNode, | 1217 | pub(crate) syntax: SyntaxNode, |
1204 | } | 1218 | } |
@@ -1250,39 +1264,20 @@ impl ConstArg { | |||
1250 | pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) } | 1264 | pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) } |
1251 | } | 1265 | } |
1252 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1266 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1253 | pub struct ExternItemList { | ||
1254 | pub(crate) syntax: SyntaxNode, | ||
1255 | } | ||
1256 | impl ExternItemList { | ||
1257 | pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } | ||
1258 | pub fn extern_items(&self) -> AstChildren<ExternItem> { support::children(&self.syntax) } | ||
1259 | pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } | ||
1260 | } | ||
1261 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
1262 | pub struct MetaItem { | ||
1263 | pub(crate) syntax: SyntaxNode, | ||
1264 | } | ||
1265 | impl MetaItem { | ||
1266 | pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } | ||
1267 | pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } | ||
1268 | pub fn attr_input(&self) -> Option<AttrInput> { support::child(&self.syntax) } | ||
1269 | pub fn nested_meta_items(&self) -> AstChildren<MetaItem> { support::children(&self.syntax) } | ||
1270 | } | ||
1271 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
1272 | pub enum Item { | 1267 | pub enum Item { |
1273 | ConstDef(ConstDef), | 1268 | Const(Const), |
1274 | EnumDef(EnumDef), | 1269 | Enum(Enum), |
1275 | ExternBlock(ExternBlock), | 1270 | ExternBlock(ExternBlock), |
1276 | ExternCrate(ExternCrate), | 1271 | ExternCrate(ExternCrate), |
1277 | FnDef(FnDef), | 1272 | Fn(Fn), |
1278 | ImplDef(ImplDef), | 1273 | Impl(Impl), |
1279 | MacroCall(MacroCall), | 1274 | MacroCall(MacroCall), |
1280 | Module(Module), | 1275 | Module(Module), |
1281 | StaticDef(StaticDef), | 1276 | Static(Static), |
1282 | StructDef(StructDef), | 1277 | Struct(Struct), |
1283 | TraitDef(TraitDef), | 1278 | Trait(Trait), |
1284 | TypeAliasDef(TypeAliasDef), | 1279 | TypeAlias(TypeAlias), |
1285 | UnionDef(UnionDef), | 1280 | Union(Union), |
1286 | Use(Use), | 1281 | Use(Use), |
1287 | } | 1282 | } |
1288 | impl ast::AttrsOwner for Item {} | 1283 | impl ast::AttrsOwner for Item {} |
@@ -1303,9 +1298,27 @@ pub enum TypeRef { | |||
1303 | DynTraitType(DynTraitType), | 1298 | DynTraitType(DynTraitType), |
1304 | } | 1299 | } |
1305 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1300 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1306 | pub enum FieldDefList { | 1301 | pub enum Pat { |
1307 | RecordFieldDefList(RecordFieldDefList), | 1302 | OrPat(OrPat), |
1308 | TupleFieldDefList(TupleFieldDefList), | 1303 | ParenPat(ParenPat), |
1304 | RefPat(RefPat), | ||
1305 | BoxPat(BoxPat), | ||
1306 | BindPat(BindPat), | ||
1307 | PlaceholderPat(PlaceholderPat), | ||
1308 | DotDotPat(DotDotPat), | ||
1309 | PathPat(PathPat), | ||
1310 | RecordPat(RecordPat), | ||
1311 | TupleStructPat(TupleStructPat), | ||
1312 | TuplePat(TuplePat), | ||
1313 | SlicePat(SlicePat), | ||
1314 | RangePat(RangePat), | ||
1315 | LiteralPat(LiteralPat), | ||
1316 | MacroPat(MacroPat), | ||
1317 | } | ||
1318 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
1319 | pub enum FieldList { | ||
1320 | RecordFieldList(RecordFieldList), | ||
1321 | TupleFieldList(TupleFieldList), | ||
1309 | } | 1322 | } |
1310 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1323 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1311 | pub enum Expr { | 1324 | pub enum Expr { |
@@ -1324,7 +1337,7 @@ pub enum Expr { | |||
1324 | BlockExpr(BlockExpr), | 1337 | BlockExpr(BlockExpr), |
1325 | ReturnExpr(ReturnExpr), | 1338 | ReturnExpr(ReturnExpr), |
1326 | MatchExpr(MatchExpr), | 1339 | MatchExpr(MatchExpr), |
1327 | RecordLit(RecordLit), | 1340 | RecordExpr(RecordExpr), |
1328 | CallExpr(CallExpr), | 1341 | CallExpr(CallExpr), |
1329 | IndexExpr(IndexExpr), | 1342 | IndexExpr(IndexExpr), |
1330 | MethodCallExpr(MethodCallExpr), | 1343 | MethodCallExpr(MethodCallExpr), |
@@ -1343,31 +1356,28 @@ pub enum Expr { | |||
1343 | } | 1356 | } |
1344 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1357 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1345 | pub enum AssocItem { | 1358 | pub enum AssocItem { |
1346 | FnDef(FnDef), | 1359 | Fn(Fn), |
1347 | TypeAliasDef(TypeAliasDef), | 1360 | TypeAlias(TypeAlias), |
1348 | ConstDef(ConstDef), | 1361 | Const(Const), |
1349 | MacroCall(MacroCall), | 1362 | MacroCall(MacroCall), |
1350 | } | 1363 | } |
1351 | impl ast::AttrsOwner for AssocItem {} | 1364 | impl ast::AttrsOwner for AssocItem {} |
1352 | impl ast::NameOwner for AssocItem {} | 1365 | impl ast::NameOwner for AssocItem {} |
1353 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1366 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1354 | pub enum Pat { | 1367 | pub enum ExternItem { |
1355 | OrPat(OrPat), | 1368 | Fn(Fn), |
1356 | ParenPat(ParenPat), | 1369 | Static(Static), |
1357 | RefPat(RefPat), | 1370 | MacroCall(MacroCall), |
1358 | BoxPat(BoxPat), | 1371 | } |
1359 | BindPat(BindPat), | 1372 | impl ast::AttrsOwner for ExternItem {} |
1360 | PlaceholderPat(PlaceholderPat), | 1373 | impl ast::NameOwner for ExternItem {} |
1361 | DotDotPat(DotDotPat), | 1374 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1362 | PathPat(PathPat), | 1375 | pub enum GenericParam { |
1363 | RecordPat(RecordPat), | 1376 | LifetimeParam(LifetimeParam), |
1364 | TupleStructPat(TupleStructPat), | 1377 | TypeParam(TypeParam), |
1365 | TuplePat(TuplePat), | 1378 | ConstParam(ConstParam), |
1366 | SlicePat(SlicePat), | ||
1367 | RangePat(RangePat), | ||
1368 | LiteralPat(LiteralPat), | ||
1369 | MacroPat(MacroPat), | ||
1370 | } | 1379 | } |
1380 | impl ast::AttrsOwner for GenericParam {} | ||
1371 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1381 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1372 | pub enum Stmt { | 1382 | pub enum Stmt { |
1373 | LetStmt(LetStmt), | 1383 | LetStmt(LetStmt), |
@@ -1375,27 +1385,14 @@ pub enum Stmt { | |||
1375 | } | 1385 | } |
1376 | impl ast::AttrsOwner for Stmt {} | 1386 | impl ast::AttrsOwner for Stmt {} |
1377 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1387 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1378 | pub enum AttrInput { | ||
1379 | Literal(Literal), | ||
1380 | TokenTree(TokenTree), | ||
1381 | } | ||
1382 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
1383 | pub enum ExternItem { | ||
1384 | FnDef(FnDef), | ||
1385 | StaticDef(StaticDef), | ||
1386 | } | ||
1387 | impl ast::AttrsOwner for ExternItem {} | ||
1388 | impl ast::NameOwner for ExternItem {} | ||
1389 | impl ast::VisibilityOwner for ExternItem {} | ||
1390 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
1391 | pub enum AdtDef { | 1388 | pub enum AdtDef { |
1392 | StructDef(StructDef), | 1389 | Struct(Struct), |
1393 | EnumDef(EnumDef), | 1390 | Enum(Enum), |
1394 | UnionDef(UnionDef), | 1391 | Union(Union), |
1395 | } | 1392 | } |
1396 | impl ast::AttrsOwner for AdtDef {} | 1393 | impl ast::AttrsOwner for AdtDef {} |
1394 | impl ast::GenericParamsOwner for AdtDef {} | ||
1397 | impl ast::NameOwner for AdtDef {} | 1395 | impl ast::NameOwner for AdtDef {} |
1398 | impl ast::TypeParamsOwner for AdtDef {} | ||
1399 | impl ast::VisibilityOwner for AdtDef {} | 1396 | impl ast::VisibilityOwner for AdtDef {} |
1400 | impl AstNode for SourceFile { | 1397 | impl AstNode for SourceFile { |
1401 | fn can_cast(kind: SyntaxKind) -> bool { kind == SOURCE_FILE } | 1398 | fn can_cast(kind: SyntaxKind) -> bool { kind == SOURCE_FILE } |
@@ -1419,8 +1416,8 @@ impl AstNode for Attr { | |||
1419 | } | 1416 | } |
1420 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1417 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1421 | } | 1418 | } |
1422 | impl AstNode for ConstDef { | 1419 | impl AstNode for Const { |
1423 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_DEF } | 1420 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONST } |
1424 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1421 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1425 | if Self::can_cast(syntax.kind()) { | 1422 | if Self::can_cast(syntax.kind()) { |
1426 | Some(Self { syntax }) | 1423 | Some(Self { syntax }) |
@@ -1430,8 +1427,8 @@ impl AstNode for ConstDef { | |||
1430 | } | 1427 | } |
1431 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1428 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1432 | } | 1429 | } |
1433 | impl AstNode for EnumDef { | 1430 | impl AstNode for Enum { |
1434 | fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_DEF } | 1431 | fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM } |
1435 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1432 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1436 | if Self::can_cast(syntax.kind()) { | 1433 | if Self::can_cast(syntax.kind()) { |
1437 | Some(Self { syntax }) | 1434 | Some(Self { syntax }) |
@@ -1463,8 +1460,8 @@ impl AstNode for ExternCrate { | |||
1463 | } | 1460 | } |
1464 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1461 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1465 | } | 1462 | } |
1466 | impl AstNode for FnDef { | 1463 | impl AstNode for Fn { |
1467 | fn can_cast(kind: SyntaxKind) -> bool { kind == FN_DEF } | 1464 | fn can_cast(kind: SyntaxKind) -> bool { kind == FN } |
1468 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1465 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1469 | if Self::can_cast(syntax.kind()) { | 1466 | if Self::can_cast(syntax.kind()) { |
1470 | Some(Self { syntax }) | 1467 | Some(Self { syntax }) |
@@ -1474,8 +1471,8 @@ impl AstNode for FnDef { | |||
1474 | } | 1471 | } |
1475 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1472 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1476 | } | 1473 | } |
1477 | impl AstNode for ImplDef { | 1474 | impl AstNode for Impl { |
1478 | fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL_DEF } | 1475 | fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL } |
1479 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1476 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1480 | if Self::can_cast(syntax.kind()) { | 1477 | if Self::can_cast(syntax.kind()) { |
1481 | Some(Self { syntax }) | 1478 | Some(Self { syntax }) |
@@ -1507,8 +1504,8 @@ impl AstNode for Module { | |||
1507 | } | 1504 | } |
1508 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1505 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1509 | } | 1506 | } |
1510 | impl AstNode for StaticDef { | 1507 | impl AstNode for Static { |
1511 | fn can_cast(kind: SyntaxKind) -> bool { kind == STATIC_DEF } | 1508 | fn can_cast(kind: SyntaxKind) -> bool { kind == STATIC } |
1512 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1509 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1513 | if Self::can_cast(syntax.kind()) { | 1510 | if Self::can_cast(syntax.kind()) { |
1514 | Some(Self { syntax }) | 1511 | Some(Self { syntax }) |
@@ -1518,8 +1515,8 @@ impl AstNode for StaticDef { | |||
1518 | } | 1515 | } |
1519 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1516 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1520 | } | 1517 | } |
1521 | impl AstNode for StructDef { | 1518 | impl AstNode for Struct { |
1522 | fn can_cast(kind: SyntaxKind) -> bool { kind == STRUCT_DEF } | 1519 | fn can_cast(kind: SyntaxKind) -> bool { kind == STRUCT } |
1523 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1520 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1524 | if Self::can_cast(syntax.kind()) { | 1521 | if Self::can_cast(syntax.kind()) { |
1525 | Some(Self { syntax }) | 1522 | Some(Self { syntax }) |
@@ -1529,8 +1526,8 @@ impl AstNode for StructDef { | |||
1529 | } | 1526 | } |
1530 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1527 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1531 | } | 1528 | } |
1532 | impl AstNode for TraitDef { | 1529 | impl AstNode for Trait { |
1533 | fn can_cast(kind: SyntaxKind) -> bool { kind == TRAIT_DEF } | 1530 | fn can_cast(kind: SyntaxKind) -> bool { kind == TRAIT } |
1534 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1531 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1535 | if Self::can_cast(syntax.kind()) { | 1532 | if Self::can_cast(syntax.kind()) { |
1536 | Some(Self { syntax }) | 1533 | Some(Self { syntax }) |
@@ -1540,8 +1537,8 @@ impl AstNode for TraitDef { | |||
1540 | } | 1537 | } |
1541 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1538 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1542 | } | 1539 | } |
1543 | impl AstNode for TypeAliasDef { | 1540 | impl AstNode for TypeAlias { |
1544 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ALIAS_DEF } | 1541 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ALIAS } |
1545 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1542 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1546 | if Self::can_cast(syntax.kind()) { | 1543 | if Self::can_cast(syntax.kind()) { |
1547 | Some(Self { syntax }) | 1544 | Some(Self { syntax }) |
@@ -1551,8 +1548,8 @@ impl AstNode for TypeAliasDef { | |||
1551 | } | 1548 | } |
1552 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1549 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1553 | } | 1550 | } |
1554 | impl AstNode for UnionDef { | 1551 | impl AstNode for Union { |
1555 | fn can_cast(kind: SyntaxKind) -> bool { kind == UNION_DEF } | 1552 | fn can_cast(kind: SyntaxKind) -> bool { kind == UNION } |
1556 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1553 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1557 | if Self::can_cast(syntax.kind()) { | 1554 | if Self::can_cast(syntax.kind()) { |
1558 | Some(Self { syntax }) | 1555 | Some(Self { syntax }) |
@@ -1672,8 +1669,8 @@ impl AstNode for Abi { | |||
1672 | } | 1669 | } |
1673 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1670 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1674 | } | 1671 | } |
1675 | impl AstNode for TypeParamList { | 1672 | impl AstNode for GenericParamList { |
1676 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_PARAM_LIST } | 1673 | fn can_cast(kind: SyntaxKind) -> bool { kind == GENERIC_PARAM_LIST } |
1677 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1674 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1678 | if Self::can_cast(syntax.kind()) { | 1675 | if Self::can_cast(syntax.kind()) { |
1679 | Some(Self { syntax }) | 1676 | Some(Self { syntax }) |
@@ -1727,8 +1724,19 @@ impl AstNode for BlockExpr { | |||
1727 | } | 1724 | } |
1728 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1725 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1729 | } | 1726 | } |
1730 | impl AstNode for RecordFieldDefList { | 1727 | impl AstNode for SelfParam { |
1731 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_DEF_LIST } | 1728 | fn can_cast(kind: SyntaxKind) -> bool { kind == SELF_PARAM } |
1729 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
1730 | if Self::can_cast(syntax.kind()) { | ||
1731 | Some(Self { syntax }) | ||
1732 | } else { | ||
1733 | None | ||
1734 | } | ||
1735 | } | ||
1736 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
1737 | } | ||
1738 | impl AstNode for Param { | ||
1739 | fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM } | ||
1732 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1740 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1733 | if Self::can_cast(syntax.kind()) { | 1741 | if Self::can_cast(syntax.kind()) { |
1734 | Some(Self { syntax }) | 1742 | Some(Self { syntax }) |
@@ -1738,8 +1746,8 @@ impl AstNode for RecordFieldDefList { | |||
1738 | } | 1746 | } |
1739 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1747 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1740 | } | 1748 | } |
1741 | impl AstNode for TupleFieldDefList { | 1749 | impl AstNode for TypeBoundList { |
1742 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_DEF_LIST } | 1750 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND_LIST } |
1743 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1751 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1744 | if Self::can_cast(syntax.kind()) { | 1752 | if Self::can_cast(syntax.kind()) { |
1745 | Some(Self { syntax }) | 1753 | Some(Self { syntax }) |
@@ -1749,8 +1757,8 @@ impl AstNode for TupleFieldDefList { | |||
1749 | } | 1757 | } |
1750 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1758 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1751 | } | 1759 | } |
1752 | impl AstNode for RecordFieldDef { | 1760 | impl AstNode for RecordFieldList { |
1753 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_DEF } | 1761 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_LIST } |
1754 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1762 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1755 | if Self::can_cast(syntax.kind()) { | 1763 | if Self::can_cast(syntax.kind()) { |
1756 | Some(Self { syntax }) | 1764 | Some(Self { syntax }) |
@@ -1760,8 +1768,8 @@ impl AstNode for RecordFieldDef { | |||
1760 | } | 1768 | } |
1761 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1769 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1762 | } | 1770 | } |
1763 | impl AstNode for TupleFieldDef { | 1771 | impl AstNode for TupleFieldList { |
1764 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_DEF } | 1772 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD_LIST } |
1765 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1773 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1766 | if Self::can_cast(syntax.kind()) { | 1774 | if Self::can_cast(syntax.kind()) { |
1767 | Some(Self { syntax }) | 1775 | Some(Self { syntax }) |
@@ -1771,8 +1779,8 @@ impl AstNode for TupleFieldDef { | |||
1771 | } | 1779 | } |
1772 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1780 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1773 | } | 1781 | } |
1774 | impl AstNode for EnumVariantList { | 1782 | impl AstNode for RecordField { |
1775 | fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_VARIANT_LIST } | 1783 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD } |
1776 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1784 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1777 | if Self::can_cast(syntax.kind()) { | 1785 | if Self::can_cast(syntax.kind()) { |
1778 | Some(Self { syntax }) | 1786 | Some(Self { syntax }) |
@@ -1782,8 +1790,8 @@ impl AstNode for EnumVariantList { | |||
1782 | } | 1790 | } |
1783 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1791 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1784 | } | 1792 | } |
1785 | impl AstNode for EnumVariant { | 1793 | impl AstNode for TupleField { |
1786 | fn can_cast(kind: SyntaxKind) -> bool { kind == ENUM_VARIANT } | 1794 | fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_FIELD } |
1787 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1795 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1788 | if Self::can_cast(syntax.kind()) { | 1796 | if Self::can_cast(syntax.kind()) { |
1789 | Some(Self { syntax }) | 1797 | Some(Self { syntax }) |
@@ -1793,8 +1801,19 @@ impl AstNode for EnumVariant { | |||
1793 | } | 1801 | } |
1794 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1802 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1795 | } | 1803 | } |
1796 | impl AstNode for TypeBoundList { | 1804 | impl AstNode for VariantList { |
1797 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND_LIST } | 1805 | fn can_cast(kind: SyntaxKind) -> bool { kind == VARIANT_LIST } |
1806 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
1807 | if Self::can_cast(syntax.kind()) { | ||
1808 | Some(Self { syntax }) | ||
1809 | } else { | ||
1810 | None | ||
1811 | } | ||
1812 | } | ||
1813 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
1814 | } | ||
1815 | impl AstNode for Variant { | ||
1816 | fn can_cast(kind: SyntaxKind) -> bool { kind == VARIANT } | ||
1798 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1817 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1799 | if Self::can_cast(syntax.kind()) { | 1818 | if Self::can_cast(syntax.kind()) { |
1800 | Some(Self { syntax }) | 1819 | Some(Self { syntax }) |
@@ -1815,6 +1834,72 @@ impl AstNode for AssocItemList { | |||
1815 | } | 1834 | } |
1816 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1835 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1817 | } | 1836 | } |
1837 | impl AstNode for ExternItemList { | ||
1838 | fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST } | ||
1839 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
1840 | if Self::can_cast(syntax.kind()) { | ||
1841 | Some(Self { syntax }) | ||
1842 | } else { | ||
1843 | None | ||
1844 | } | ||
1845 | } | ||
1846 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
1847 | } | ||
1848 | impl AstNode for LifetimeParam { | ||
1849 | fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_PARAM } | ||
1850 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
1851 | if Self::can_cast(syntax.kind()) { | ||
1852 | Some(Self { syntax }) | ||
1853 | } else { | ||
1854 | None | ||
1855 | } | ||
1856 | } | ||
1857 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
1858 | } | ||
1859 | impl AstNode for TypeParam { | ||
1860 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_PARAM } | ||
1861 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
1862 | if Self::can_cast(syntax.kind()) { | ||
1863 | Some(Self { syntax }) | ||
1864 | } else { | ||
1865 | None | ||
1866 | } | ||
1867 | } | ||
1868 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
1869 | } | ||
1870 | impl AstNode for ConstParam { | ||
1871 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_PARAM } | ||
1872 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
1873 | if Self::can_cast(syntax.kind()) { | ||
1874 | Some(Self { syntax }) | ||
1875 | } else { | ||
1876 | None | ||
1877 | } | ||
1878 | } | ||
1879 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
1880 | } | ||
1881 | impl AstNode for Literal { | ||
1882 | fn can_cast(kind: SyntaxKind) -> bool { kind == LITERAL } | ||
1883 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
1884 | if Self::can_cast(syntax.kind()) { | ||
1885 | Some(Self { syntax }) | ||
1886 | } else { | ||
1887 | None | ||
1888 | } | ||
1889 | } | ||
1890 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
1891 | } | ||
1892 | impl AstNode for TokenTree { | ||
1893 | fn can_cast(kind: SyntaxKind) -> bool { kind == TOKEN_TREE } | ||
1894 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
1895 | if Self::can_cast(syntax.kind()) { | ||
1896 | Some(Self { syntax }) | ||
1897 | } else { | ||
1898 | None | ||
1899 | } | ||
1900 | } | ||
1901 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
1902 | } | ||
1818 | impl AstNode for ParenType { | 1903 | impl AstNode for ParenType { |
1819 | fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_TYPE } | 1904 | fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_TYPE } |
1820 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1905 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2277,17 +2362,6 @@ impl AstNode for BinExpr { | |||
2277 | } | 2362 | } |
2278 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2363 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2279 | } | 2364 | } |
2280 | impl AstNode for Literal { | ||
2281 | fn can_cast(kind: SyntaxKind) -> bool { kind == LITERAL } | ||
2282 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
2283 | if Self::can_cast(syntax.kind()) { | ||
2284 | Some(Self { syntax }) | ||
2285 | } else { | ||
2286 | None | ||
2287 | } | ||
2288 | } | ||
2289 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
2290 | } | ||
2291 | impl AstNode for MatchExpr { | 2365 | impl AstNode for MatchExpr { |
2292 | fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_EXPR } | 2366 | fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_EXPR } |
2293 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2367 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2332,8 +2406,8 @@ impl AstNode for MatchGuard { | |||
2332 | } | 2406 | } |
2333 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2407 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2334 | } | 2408 | } |
2335 | impl AstNode for RecordLit { | 2409 | impl AstNode for RecordExpr { |
2336 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_LIT } | 2410 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR } |
2337 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2411 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
2338 | if Self::can_cast(syntax.kind()) { | 2412 | if Self::can_cast(syntax.kind()) { |
2339 | Some(Self { syntax }) | 2413 | Some(Self { syntax }) |
@@ -2343,8 +2417,8 @@ impl AstNode for RecordLit { | |||
2343 | } | 2417 | } |
2344 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2418 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2345 | } | 2419 | } |
2346 | impl AstNode for RecordFieldList { | 2420 | impl AstNode for RecordExprFieldList { |
2347 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_LIST } | 2421 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD_LIST } |
2348 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2422 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
2349 | if Self::can_cast(syntax.kind()) { | 2423 | if Self::can_cast(syntax.kind()) { |
2350 | Some(Self { syntax }) | 2424 | Some(Self { syntax }) |
@@ -2354,8 +2428,8 @@ impl AstNode for RecordFieldList { | |||
2354 | } | 2428 | } |
2355 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2429 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2356 | } | 2430 | } |
2357 | impl AstNode for RecordField { | 2431 | impl AstNode for RecordExprField { |
2358 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD } | 2432 | fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD } |
2359 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2433 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
2360 | if Self::can_cast(syntax.kind()) { | 2434 | if Self::can_cast(syntax.kind()) { |
2361 | Some(Self { syntax }) | 2435 | Some(Self { syntax }) |
@@ -2552,17 +2626,6 @@ impl AstNode for TuplePat { | |||
2552 | } | 2626 | } |
2553 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2627 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2554 | } | 2628 | } |
2555 | impl AstNode for TokenTree { | ||
2556 | fn can_cast(kind: SyntaxKind) -> bool { kind == TOKEN_TREE } | ||
2557 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
2558 | if Self::can_cast(syntax.kind()) { | ||
2559 | Some(Self { syntax }) | ||
2560 | } else { | ||
2561 | None | ||
2562 | } | ||
2563 | } | ||
2564 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
2565 | } | ||
2566 | impl AstNode for MacroDef { | 2629 | impl AstNode for MacroDef { |
2567 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_DEF } | 2630 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_DEF } |
2568 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2631 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2596,39 +2659,6 @@ impl AstNode for MacroStmts { | |||
2596 | } | 2659 | } |
2597 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2660 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2598 | } | 2661 | } |
2599 | impl AstNode for TypeParam { | ||
2600 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_PARAM } | ||
2601 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
2602 | if Self::can_cast(syntax.kind()) { | ||
2603 | Some(Self { syntax }) | ||
2604 | } else { | ||
2605 | None | ||
2606 | } | ||
2607 | } | ||
2608 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
2609 | } | ||
2610 | impl AstNode for LifetimeParam { | ||
2611 | fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_PARAM } | ||
2612 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
2613 | if Self::can_cast(syntax.kind()) { | ||
2614 | Some(Self { syntax }) | ||
2615 | } else { | ||
2616 | None | ||
2617 | } | ||
2618 | } | ||
2619 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
2620 | } | ||
2621 | impl AstNode for ConstParam { | ||
2622 | fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_PARAM } | ||
2623 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
2624 | if Self::can_cast(syntax.kind()) { | ||
2625 | Some(Self { syntax }) | ||
2626 | } else { | ||
2627 | None | ||
2628 | } | ||
2629 | } | ||
2630 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
2631 | } | ||
2632 | impl AstNode for TypeBound { | 2662 | impl AstNode for TypeBound { |
2633 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND } | 2663 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND } |
2634 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2664 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2673,28 +2703,6 @@ impl AstNode for LetStmt { | |||
2673 | } | 2703 | } |
2674 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2704 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2675 | } | 2705 | } |
2676 | impl AstNode for SelfParam { | ||
2677 | fn can_cast(kind: SyntaxKind) -> bool { kind == SELF_PARAM } | ||
2678 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
2679 | if Self::can_cast(syntax.kind()) { | ||
2680 | Some(Self { syntax }) | ||
2681 | } else { | ||
2682 | None | ||
2683 | } | ||
2684 | } | ||
2685 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
2686 | } | ||
2687 | impl AstNode for Param { | ||
2688 | fn can_cast(kind: SyntaxKind) -> bool { kind == PARAM } | ||
2689 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
2690 | if Self::can_cast(syntax.kind()) { | ||
2691 | Some(Self { syntax }) | ||
2692 | } else { | ||
2693 | None | ||
2694 | } | ||
2695 | } | ||
2696 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
2697 | } | ||
2698 | impl AstNode for PathSegment { | 2706 | impl AstNode for PathSegment { |
2699 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_SEGMENT } | 2707 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_SEGMENT } |
2700 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2708 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -2750,33 +2758,11 @@ impl AstNode for ConstArg { | |||
2750 | } | 2758 | } |
2751 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2759 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2752 | } | 2760 | } |
2753 | impl AstNode for ExternItemList { | 2761 | impl From<Const> for Item { |
2754 | fn can_cast(kind: SyntaxKind) -> bool { kind == EXTERN_ITEM_LIST } | 2762 | fn from(node: Const) -> Item { Item::Const(node) } |
2755 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
2756 | if Self::can_cast(syntax.kind()) { | ||
2757 | Some(Self { syntax }) | ||
2758 | } else { | ||
2759 | None | ||
2760 | } | ||
2761 | } | ||
2762 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
2763 | } | 2763 | } |
2764 | impl AstNode for MetaItem { | 2764 | impl From<Enum> for Item { |
2765 | fn can_cast(kind: SyntaxKind) -> bool { kind == META_ITEM } | 2765 | fn from(node: Enum) -> Item { Item::Enum(node) } |
2766 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
2767 | if Self::can_cast(syntax.kind()) { | ||
2768 | Some(Self { syntax }) | ||
2769 | } else { | ||
2770 | None | ||
2771 | } | ||
2772 | } | ||
2773 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
2774 | } | ||
2775 | impl From<ConstDef> for Item { | ||
2776 | fn from(node: ConstDef) -> Item { Item::ConstDef(node) } | ||
2777 | } | ||
2778 | impl From<EnumDef> for Item { | ||
2779 | fn from(node: EnumDef) -> Item { Item::EnumDef(node) } | ||
2780 | } | 2766 | } |
2781 | impl From<ExternBlock> for Item { | 2767 | impl From<ExternBlock> for Item { |
2782 | fn from(node: ExternBlock) -> Item { Item::ExternBlock(node) } | 2768 | fn from(node: ExternBlock) -> Item { Item::ExternBlock(node) } |
@@ -2784,11 +2770,11 @@ impl From<ExternBlock> for Item { | |||
2784 | impl From<ExternCrate> for Item { | 2770 | impl From<ExternCrate> for Item { |
2785 | fn from(node: ExternCrate) -> Item { Item::ExternCrate(node) } | 2771 | fn from(node: ExternCrate) -> Item { Item::ExternCrate(node) } |
2786 | } | 2772 | } |
2787 | impl From<FnDef> for Item { | 2773 | impl From<Fn> for Item { |
2788 | fn from(node: FnDef) -> Item { Item::FnDef(node) } | 2774 | fn from(node: Fn) -> Item { Item::Fn(node) } |
2789 | } | 2775 | } |
2790 | impl From<ImplDef> for Item { | 2776 | impl From<Impl> for Item { |
2791 | fn from(node: ImplDef) -> Item { Item::ImplDef(node) } | 2777 | fn from(node: Impl) -> Item { Item::Impl(node) } |
2792 | } | 2778 | } |
2793 | impl From<MacroCall> for Item { | 2779 | impl From<MacroCall> for Item { |
2794 | fn from(node: MacroCall) -> Item { Item::MacroCall(node) } | 2780 | fn from(node: MacroCall) -> Item { Item::MacroCall(node) } |
@@ -2796,20 +2782,20 @@ impl From<MacroCall> for Item { | |||
2796 | impl From<Module> for Item { | 2782 | impl From<Module> for Item { |
2797 | fn from(node: Module) -> Item { Item::Module(node) } | 2783 | fn from(node: Module) -> Item { Item::Module(node) } |
2798 | } | 2784 | } |
2799 | impl From<StaticDef> for Item { | 2785 | impl From<Static> for Item { |
2800 | fn from(node: StaticDef) -> Item { Item::StaticDef(node) } | 2786 | fn from(node: Static) -> Item { Item::Static(node) } |
2801 | } | 2787 | } |
2802 | impl From<StructDef> for Item { | 2788 | impl From<Struct> for Item { |
2803 | fn from(node: StructDef) -> Item { Item::StructDef(node) } | 2789 | fn from(node: Struct) -> Item { Item::Struct(node) } |
2804 | } | 2790 | } |
2805 | impl From<TraitDef> for Item { | 2791 | impl From<Trait> for Item { |
2806 | fn from(node: TraitDef) -> Item { Item::TraitDef(node) } | 2792 | fn from(node: Trait) -> Item { Item::Trait(node) } |
2807 | } | 2793 | } |
2808 | impl From<TypeAliasDef> for Item { | 2794 | impl From<TypeAlias> for Item { |
2809 | fn from(node: TypeAliasDef) -> Item { Item::TypeAliasDef(node) } | 2795 | fn from(node: TypeAlias) -> Item { Item::TypeAlias(node) } |
2810 | } | 2796 | } |
2811 | impl From<UnionDef> for Item { | 2797 | impl From<Union> for Item { |
2812 | fn from(node: UnionDef) -> Item { Item::UnionDef(node) } | 2798 | fn from(node: Union) -> Item { Item::Union(node) } |
2813 | } | 2799 | } |
2814 | impl From<Use> for Item { | 2800 | impl From<Use> for Item { |
2815 | fn from(node: Use) -> Item { Item::Use(node) } | 2801 | fn from(node: Use) -> Item { Item::Use(node) } |
@@ -2817,28 +2803,26 @@ impl From<Use> for Item { | |||
2817 | impl AstNode for Item { | 2803 | impl AstNode for Item { |
2818 | fn can_cast(kind: SyntaxKind) -> bool { | 2804 | fn can_cast(kind: SyntaxKind) -> bool { |
2819 | match kind { | 2805 | match kind { |
2820 | CONST_DEF | ENUM_DEF | EXTERN_BLOCK | EXTERN_CRATE | FN_DEF | IMPL_DEF | MACRO_CALL | 2806 | CONST | ENUM | EXTERN_BLOCK | EXTERN_CRATE | FN | IMPL | MACRO_CALL | MODULE |
2821 | | MODULE | STATIC_DEF | STRUCT_DEF | TRAIT_DEF | TYPE_ALIAS_DEF | UNION_DEF | USE => { | 2807 | | STATIC | STRUCT | TRAIT | TYPE_ALIAS | UNION | USE => true, |
2822 | true | ||
2823 | } | ||
2824 | _ => false, | 2808 | _ => false, |
2825 | } | 2809 | } |
2826 | } | 2810 | } |
2827 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 2811 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
2828 | let res = match syntax.kind() { | 2812 | let res = match syntax.kind() { |
2829 | CONST_DEF => Item::ConstDef(ConstDef { syntax }), | 2813 | CONST => Item::Const(Const { syntax }), |
2830 | ENUM_DEF => Item::EnumDef(EnumDef { syntax }), | 2814 | ENUM => Item::Enum(Enum { syntax }), |
2831 | EXTERN_BLOCK => Item::ExternBlock(ExternBlock { syntax }), | 2815 | EXTERN_BLOCK => Item::ExternBlock(ExternBlock { syntax }), |
2832 | EXTERN_CRATE => Item::ExternCrate(ExternCrate { syntax }), | 2816 | EXTERN_CRATE => Item::ExternCrate(ExternCrate { syntax }), |
2833 | FN_DEF => Item::FnDef(FnDef { syntax }), | 2817 | FN => Item::Fn(Fn { syntax }), |
2834 | IMPL_DEF => Item::ImplDef(ImplDef { syntax }), | 2818 | IMPL => Item::Impl(Impl { syntax }), |
2835 | MACRO_CALL => Item::MacroCall(MacroCall { syntax }), | 2819 | MACRO_CALL => Item::MacroCall(MacroCall { syntax }), |
2836 | MODULE => Item::Module(Module { syntax }), | 2820 | MODULE => Item::Module(Module { syntax }), |
2837 | STATIC_DEF => Item::StaticDef(StaticDef { syntax }), | 2821 | STATIC => Item::Static(Static { syntax }), |
2838 | STRUCT_DEF => Item::StructDef(StructDef { syntax }), | 2822 | STRUCT => Item::Struct(Struct { syntax }), |
2839 | TRAIT_DEF => Item::TraitDef(TraitDef { syntax }), | 2823 | TRAIT => Item::Trait(Trait { syntax }), |
2840 | TYPE_ALIAS_DEF => Item::TypeAliasDef(TypeAliasDef { syntax }), | 2824 | TYPE_ALIAS => Item::TypeAlias(TypeAlias { syntax }), |
2841 | UNION_DEF => Item::UnionDef(UnionDef { syntax }), | 2825 | UNION => Item::Union(Union { syntax }), |
2842 | USE => Item::Use(Use { syntax }), | 2826 | USE => Item::Use(Use { syntax }), |
2843 | _ => return None, | 2827 | _ => return None, |
2844 | }; | 2828 | }; |
@@ -2846,19 +2830,19 @@ impl AstNode for Item { | |||
2846 | } | 2830 | } |
2847 | fn syntax(&self) -> &SyntaxNode { | 2831 | fn syntax(&self) -> &SyntaxNode { |
2848 | match self { | 2832 | match self { |
2849 | Item::ConstDef(it) => &it.syntax, | 2833 | Item::Const(it) => &it.syntax, |
2850 | Item::EnumDef(it) => &it.syntax, | 2834 | Item::Enum(it) => &it.syntax, |
2851 | Item::ExternBlock(it) => &it.syntax, | 2835 | Item::ExternBlock(it) => &it.syntax, |
2852 | Item::ExternCrate(it) => &it.syntax, | 2836 | Item::ExternCrate(it) => &it.syntax, |
2853 | Item::FnDef(it) => &it.syntax, | 2837 | Item::Fn(it) => &it.syntax, |
2854 | Item::ImplDef(it) => &it.syntax, | 2838 | Item::Impl(it) => &it.syntax, |
2855 | Item::MacroCall(it) => &it.syntax, | 2839 | Item::MacroCall(it) => &it.syntax, |
2856 | Item::Module(it) => &it.syntax, | 2840 | Item::Module(it) => &it.syntax, |
2857 | Item::StaticDef(it) => &it.syntax, | 2841 | Item::Static(it) => &it.syntax, |
2858 | Item::StructDef(it) => &it.syntax, | 2842 | Item::Struct(it) => &it.syntax, |
2859 | Item::TraitDef(it) => &it.syntax, | 2843 | Item::Trait(it) => &it.syntax, |
2860 | Item::TypeAliasDef(it) => &it.syntax, | 2844 | Item::TypeAlias(it) => &it.syntax, |
2861 | Item::UnionDef(it) => &it.syntax, | 2845 | Item::Union(it) => &it.syntax, |
2862 | Item::Use(it) => &it.syntax, | 2846 | Item::Use(it) => &it.syntax, |
2863 | } | 2847 | } |
2864 | } | 2848 | } |
@@ -2948,33 +2932,126 @@ impl AstNode for TypeRef { | |||
2948 | } | 2932 | } |
2949 | } | 2933 | } |
2950 | } | 2934 | } |
2951 | impl From<RecordFieldDefList> for FieldDefList { | 2935 | impl From<OrPat> for Pat { |
2952 | fn from(node: RecordFieldDefList) -> FieldDefList { FieldDefList::RecordFieldDefList(node) } | 2936 | fn from(node: OrPat) -> Pat { Pat::OrPat(node) } |
2937 | } | ||
2938 | impl From<ParenPat> for Pat { | ||
2939 | fn from(node: ParenPat) -> Pat { Pat::ParenPat(node) } | ||
2940 | } | ||
2941 | impl From<RefPat> for Pat { | ||
2942 | fn from(node: RefPat) -> Pat { Pat::RefPat(node) } | ||
2943 | } | ||
2944 | impl From<BoxPat> for Pat { | ||
2945 | fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) } | ||
2946 | } | ||
2947 | impl From<BindPat> for Pat { | ||
2948 | fn from(node: BindPat) -> Pat { Pat::BindPat(node) } | ||
2949 | } | ||
2950 | impl From<PlaceholderPat> for Pat { | ||
2951 | fn from(node: PlaceholderPat) -> Pat { Pat::PlaceholderPat(node) } | ||
2952 | } | ||
2953 | impl From<DotDotPat> for Pat { | ||
2954 | fn from(node: DotDotPat) -> Pat { Pat::DotDotPat(node) } | ||
2955 | } | ||
2956 | impl From<PathPat> for Pat { | ||
2957 | fn from(node: PathPat) -> Pat { Pat::PathPat(node) } | ||
2958 | } | ||
2959 | impl From<RecordPat> for Pat { | ||
2960 | fn from(node: RecordPat) -> Pat { Pat::RecordPat(node) } | ||
2961 | } | ||
2962 | impl From<TupleStructPat> for Pat { | ||
2963 | fn from(node: TupleStructPat) -> Pat { Pat::TupleStructPat(node) } | ||
2964 | } | ||
2965 | impl From<TuplePat> for Pat { | ||
2966 | fn from(node: TuplePat) -> Pat { Pat::TuplePat(node) } | ||
2967 | } | ||
2968 | impl From<SlicePat> for Pat { | ||
2969 | fn from(node: SlicePat) -> Pat { Pat::SlicePat(node) } | ||
2970 | } | ||
2971 | impl From<RangePat> for Pat { | ||
2972 | fn from(node: RangePat) -> Pat { Pat::RangePat(node) } | ||
2973 | } | ||
2974 | impl From<LiteralPat> for Pat { | ||
2975 | fn from(node: LiteralPat) -> Pat { Pat::LiteralPat(node) } | ||
2976 | } | ||
2977 | impl From<MacroPat> for Pat { | ||
2978 | fn from(node: MacroPat) -> Pat { Pat::MacroPat(node) } | ||
2979 | } | ||
2980 | impl AstNode for Pat { | ||
2981 | fn can_cast(kind: SyntaxKind) -> bool { | ||
2982 | match kind { | ||
2983 | OR_PAT | PAREN_PAT | REF_PAT | BOX_PAT | BIND_PAT | PLACEHOLDER_PAT | DOT_DOT_PAT | ||
2984 | | PATH_PAT | RECORD_PAT | TUPLE_STRUCT_PAT | TUPLE_PAT | SLICE_PAT | RANGE_PAT | ||
2985 | | LITERAL_PAT | MACRO_PAT => true, | ||
2986 | _ => false, | ||
2987 | } | ||
2988 | } | ||
2989 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
2990 | let res = match syntax.kind() { | ||
2991 | OR_PAT => Pat::OrPat(OrPat { syntax }), | ||
2992 | PAREN_PAT => Pat::ParenPat(ParenPat { syntax }), | ||
2993 | REF_PAT => Pat::RefPat(RefPat { syntax }), | ||
2994 | BOX_PAT => Pat::BoxPat(BoxPat { syntax }), | ||
2995 | BIND_PAT => Pat::BindPat(BindPat { syntax }), | ||
2996 | PLACEHOLDER_PAT => Pat::PlaceholderPat(PlaceholderPat { syntax }), | ||
2997 | DOT_DOT_PAT => Pat::DotDotPat(DotDotPat { syntax }), | ||
2998 | PATH_PAT => Pat::PathPat(PathPat { syntax }), | ||
2999 | RECORD_PAT => Pat::RecordPat(RecordPat { syntax }), | ||
3000 | TUPLE_STRUCT_PAT => Pat::TupleStructPat(TupleStructPat { syntax }), | ||
3001 | TUPLE_PAT => Pat::TuplePat(TuplePat { syntax }), | ||
3002 | SLICE_PAT => Pat::SlicePat(SlicePat { syntax }), | ||
3003 | RANGE_PAT => Pat::RangePat(RangePat { syntax }), | ||
3004 | LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }), | ||
3005 | MACRO_PAT => Pat::MacroPat(MacroPat { syntax }), | ||
3006 | _ => return None, | ||
3007 | }; | ||
3008 | Some(res) | ||
3009 | } | ||
3010 | fn syntax(&self) -> &SyntaxNode { | ||
3011 | match self { | ||
3012 | Pat::OrPat(it) => &it.syntax, | ||
3013 | Pat::ParenPat(it) => &it.syntax, | ||
3014 | Pat::RefPat(it) => &it.syntax, | ||
3015 | Pat::BoxPat(it) => &it.syntax, | ||
3016 | Pat::BindPat(it) => &it.syntax, | ||
3017 | Pat::PlaceholderPat(it) => &it.syntax, | ||
3018 | Pat::DotDotPat(it) => &it.syntax, | ||
3019 | Pat::PathPat(it) => &it.syntax, | ||
3020 | Pat::RecordPat(it) => &it.syntax, | ||
3021 | Pat::TupleStructPat(it) => &it.syntax, | ||
3022 | Pat::TuplePat(it) => &it.syntax, | ||
3023 | Pat::SlicePat(it) => &it.syntax, | ||
3024 | Pat::RangePat(it) => &it.syntax, | ||
3025 | Pat::LiteralPat(it) => &it.syntax, | ||
3026 | Pat::MacroPat(it) => &it.syntax, | ||
3027 | } | ||
3028 | } | ||
3029 | } | ||
3030 | impl From<RecordFieldList> for FieldList { | ||
3031 | fn from(node: RecordFieldList) -> FieldList { FieldList::RecordFieldList(node) } | ||
2953 | } | 3032 | } |
2954 | impl From<TupleFieldDefList> for FieldDefList { | 3033 | impl From<TupleFieldList> for FieldList { |
2955 | fn from(node: TupleFieldDefList) -> FieldDefList { FieldDefList::TupleFieldDefList(node) } | 3034 | fn from(node: TupleFieldList) -> FieldList { FieldList::TupleFieldList(node) } |
2956 | } | 3035 | } |
2957 | impl AstNode for FieldDefList { | 3036 | impl AstNode for FieldList { |
2958 | fn can_cast(kind: SyntaxKind) -> bool { | 3037 | fn can_cast(kind: SyntaxKind) -> bool { |
2959 | match kind { | 3038 | match kind { |
2960 | RECORD_FIELD_DEF_LIST | TUPLE_FIELD_DEF_LIST => true, | 3039 | RECORD_FIELD_LIST | TUPLE_FIELD_LIST => true, |
2961 | _ => false, | 3040 | _ => false, |
2962 | } | 3041 | } |
2963 | } | 3042 | } |
2964 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 3043 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
2965 | let res = match syntax.kind() { | 3044 | let res = match syntax.kind() { |
2966 | RECORD_FIELD_DEF_LIST => { | 3045 | RECORD_FIELD_LIST => FieldList::RecordFieldList(RecordFieldList { syntax }), |
2967 | FieldDefList::RecordFieldDefList(RecordFieldDefList { syntax }) | 3046 | TUPLE_FIELD_LIST => FieldList::TupleFieldList(TupleFieldList { syntax }), |
2968 | } | ||
2969 | TUPLE_FIELD_DEF_LIST => FieldDefList::TupleFieldDefList(TupleFieldDefList { syntax }), | ||
2970 | _ => return None, | 3047 | _ => return None, |
2971 | }; | 3048 | }; |
2972 | Some(res) | 3049 | Some(res) |
2973 | } | 3050 | } |
2974 | fn syntax(&self) -> &SyntaxNode { | 3051 | fn syntax(&self) -> &SyntaxNode { |
2975 | match self { | 3052 | match self { |
2976 | FieldDefList::RecordFieldDefList(it) => &it.syntax, | 3053 | FieldList::RecordFieldList(it) => &it.syntax, |
2977 | FieldDefList::TupleFieldDefList(it) => &it.syntax, | 3054 | FieldList::TupleFieldList(it) => &it.syntax, |
2978 | } | 3055 | } |
2979 | } | 3056 | } |
2980 | } | 3057 | } |
@@ -3023,8 +3100,8 @@ impl From<ReturnExpr> for Expr { | |||
3023 | impl From<MatchExpr> for Expr { | 3100 | impl From<MatchExpr> for Expr { |
3024 | fn from(node: MatchExpr) -> Expr { Expr::MatchExpr(node) } | 3101 | fn from(node: MatchExpr) -> Expr { Expr::MatchExpr(node) } |
3025 | } | 3102 | } |
3026 | impl From<RecordLit> for Expr { | 3103 | impl From<RecordExpr> for Expr { |
3027 | fn from(node: RecordLit) -> Expr { Expr::RecordLit(node) } | 3104 | fn from(node: RecordExpr) -> Expr { Expr::RecordExpr(node) } |
3028 | } | 3105 | } |
3029 | impl From<CallExpr> for Expr { | 3106 | impl From<CallExpr> for Expr { |
3030 | fn from(node: CallExpr) -> Expr { Expr::CallExpr(node) } | 3107 | fn from(node: CallExpr) -> Expr { Expr::CallExpr(node) } |
@@ -3076,7 +3153,7 @@ impl AstNode for Expr { | |||
3076 | match kind { | 3153 | match kind { |
3077 | TUPLE_EXPR | ARRAY_EXPR | PAREN_EXPR | PATH_EXPR | LAMBDA_EXPR | IF_EXPR | 3154 | TUPLE_EXPR | ARRAY_EXPR | PAREN_EXPR | PATH_EXPR | LAMBDA_EXPR | IF_EXPR |
3078 | | LOOP_EXPR | FOR_EXPR | WHILE_EXPR | CONTINUE_EXPR | BREAK_EXPR | LABEL | 3155 | | LOOP_EXPR | FOR_EXPR | WHILE_EXPR | CONTINUE_EXPR | BREAK_EXPR | LABEL |
3079 | | BLOCK_EXPR | RETURN_EXPR | MATCH_EXPR | RECORD_LIT | CALL_EXPR | INDEX_EXPR | 3156 | | BLOCK_EXPR | RETURN_EXPR | MATCH_EXPR | RECORD_EXPR | CALL_EXPR | INDEX_EXPR |
3080 | | METHOD_CALL_EXPR | FIELD_EXPR | AWAIT_EXPR | TRY_EXPR | EFFECT_EXPR | CAST_EXPR | 3157 | | METHOD_CALL_EXPR | FIELD_EXPR | AWAIT_EXPR | TRY_EXPR | EFFECT_EXPR | CAST_EXPR |
3081 | | REF_EXPR | PREFIX_EXPR | RANGE_EXPR | BIN_EXPR | LITERAL | MACRO_CALL | BOX_EXPR => { | 3158 | | REF_EXPR | PREFIX_EXPR | RANGE_EXPR | BIN_EXPR | LITERAL | MACRO_CALL | BOX_EXPR => { |
3082 | true | 3159 | true |
@@ -3101,7 +3178,7 @@ impl AstNode for Expr { | |||
3101 | BLOCK_EXPR => Expr::BlockExpr(BlockExpr { syntax }), | 3178 | BLOCK_EXPR => Expr::BlockExpr(BlockExpr { syntax }), |
3102 | RETURN_EXPR => Expr::ReturnExpr(ReturnExpr { syntax }), | 3179 | RETURN_EXPR => Expr::ReturnExpr(ReturnExpr { syntax }), |
3103 | MATCH_EXPR => Expr::MatchExpr(MatchExpr { syntax }), | 3180 | MATCH_EXPR => Expr::MatchExpr(MatchExpr { syntax }), |
3104 | RECORD_LIT => Expr::RecordLit(RecordLit { syntax }), | 3181 | RECORD_EXPR => Expr::RecordExpr(RecordExpr { syntax }), |
3105 | CALL_EXPR => Expr::CallExpr(CallExpr { syntax }), | 3182 | CALL_EXPR => Expr::CallExpr(CallExpr { syntax }), |
3106 | INDEX_EXPR => Expr::IndexExpr(IndexExpr { syntax }), | 3183 | INDEX_EXPR => Expr::IndexExpr(IndexExpr { syntax }), |
3107 | METHOD_CALL_EXPR => Expr::MethodCallExpr(MethodCallExpr { syntax }), | 3184 | METHOD_CALL_EXPR => Expr::MethodCallExpr(MethodCallExpr { syntax }), |
@@ -3138,7 +3215,7 @@ impl AstNode for Expr { | |||
3138 | Expr::BlockExpr(it) => &it.syntax, | 3215 | Expr::BlockExpr(it) => &it.syntax, |
3139 | Expr::ReturnExpr(it) => &it.syntax, | 3216 | Expr::ReturnExpr(it) => &it.syntax, |
3140 | Expr::MatchExpr(it) => &it.syntax, | 3217 | Expr::MatchExpr(it) => &it.syntax, |
3141 | Expr::RecordLit(it) => &it.syntax, | 3218 | Expr::RecordExpr(it) => &it.syntax, |
3142 | Expr::CallExpr(it) => &it.syntax, | 3219 | Expr::CallExpr(it) => &it.syntax, |
3143 | Expr::IndexExpr(it) => &it.syntax, | 3220 | Expr::IndexExpr(it) => &it.syntax, |
3144 | Expr::MethodCallExpr(it) => &it.syntax, | 3221 | Expr::MethodCallExpr(it) => &it.syntax, |
@@ -3157,14 +3234,14 @@ impl AstNode for Expr { | |||
3157 | } | 3234 | } |
3158 | } | 3235 | } |
3159 | } | 3236 | } |
3160 | impl From<FnDef> for AssocItem { | 3237 | impl From<Fn> for AssocItem { |
3161 | fn from(node: FnDef) -> AssocItem { AssocItem::FnDef(node) } | 3238 | fn from(node: Fn) -> AssocItem { AssocItem::Fn(node) } |
3162 | } | 3239 | } |
3163 | impl From<TypeAliasDef> for AssocItem { | 3240 | impl From<TypeAlias> for AssocItem { |
3164 | fn from(node: TypeAliasDef) -> AssocItem { AssocItem::TypeAliasDef(node) } | 3241 | fn from(node: TypeAlias) -> AssocItem { AssocItem::TypeAlias(node) } |
3165 | } | 3242 | } |
3166 | impl From<ConstDef> for AssocItem { | 3243 | impl From<Const> for AssocItem { |
3167 | fn from(node: ConstDef) -> AssocItem { AssocItem::ConstDef(node) } | 3244 | fn from(node: Const) -> AssocItem { AssocItem::Const(node) } |
3168 | } | 3245 | } |
3169 | impl From<MacroCall> for AssocItem { | 3246 | impl From<MacroCall> for AssocItem { |
3170 | fn from(node: MacroCall) -> AssocItem { AssocItem::MacroCall(node) } | 3247 | fn from(node: MacroCall) -> AssocItem { AssocItem::MacroCall(node) } |
@@ -3172,15 +3249,15 @@ impl From<MacroCall> for AssocItem { | |||
3172 | impl AstNode for AssocItem { | 3249 | impl AstNode for AssocItem { |
3173 | fn can_cast(kind: SyntaxKind) -> bool { | 3250 | fn can_cast(kind: SyntaxKind) -> bool { |
3174 | match kind { | 3251 | match kind { |
3175 | FN_DEF | TYPE_ALIAS_DEF | CONST_DEF | MACRO_CALL => true, | 3252 | FN | TYPE_ALIAS | CONST | MACRO_CALL => true, |
3176 | _ => false, | 3253 | _ => false, |
3177 | } | 3254 | } |
3178 | } | 3255 | } |
3179 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 3256 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
3180 | let res = match syntax.kind() { | 3257 | let res = match syntax.kind() { |
3181 | FN_DEF => AssocItem::FnDef(FnDef { syntax }), | 3258 | FN => AssocItem::Fn(Fn { syntax }), |
3182 | TYPE_ALIAS_DEF => AssocItem::TypeAliasDef(TypeAliasDef { syntax }), | 3259 | TYPE_ALIAS => AssocItem::TypeAlias(TypeAlias { syntax }), |
3183 | CONST_DEF => AssocItem::ConstDef(ConstDef { syntax }), | 3260 | CONST => AssocItem::Const(Const { syntax }), |
3184 | MACRO_CALL => AssocItem::MacroCall(MacroCall { syntax }), | 3261 | MACRO_CALL => AssocItem::MacroCall(MacroCall { syntax }), |
3185 | _ => return None, | 3262 | _ => return None, |
3186 | }; | 3263 | }; |
@@ -3188,222 +3265,137 @@ impl AstNode for AssocItem { | |||
3188 | } | 3265 | } |
3189 | fn syntax(&self) -> &SyntaxNode { | 3266 | fn syntax(&self) -> &SyntaxNode { |
3190 | match self { | 3267 | match self { |
3191 | AssocItem::FnDef(it) => &it.syntax, | 3268 | AssocItem::Fn(it) => &it.syntax, |
3192 | AssocItem::TypeAliasDef(it) => &it.syntax, | 3269 | AssocItem::TypeAlias(it) => &it.syntax, |
3193 | AssocItem::ConstDef(it) => &it.syntax, | 3270 | AssocItem::Const(it) => &it.syntax, |
3194 | AssocItem::MacroCall(it) => &it.syntax, | 3271 | AssocItem::MacroCall(it) => &it.syntax, |
3195 | } | 3272 | } |
3196 | } | 3273 | } |
3197 | } | 3274 | } |
3198 | impl From<OrPat> for Pat { | 3275 | impl From<Fn> for ExternItem { |
3199 | fn from(node: OrPat) -> Pat { Pat::OrPat(node) } | 3276 | fn from(node: Fn) -> ExternItem { ExternItem::Fn(node) } |
3200 | } | ||
3201 | impl From<ParenPat> for Pat { | ||
3202 | fn from(node: ParenPat) -> Pat { Pat::ParenPat(node) } | ||
3203 | } | ||
3204 | impl From<RefPat> for Pat { | ||
3205 | fn from(node: RefPat) -> Pat { Pat::RefPat(node) } | ||
3206 | } | ||
3207 | impl From<BoxPat> for Pat { | ||
3208 | fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) } | ||
3209 | } | ||
3210 | impl From<BindPat> for Pat { | ||
3211 | fn from(node: BindPat) -> Pat { Pat::BindPat(node) } | ||
3212 | } | 3277 | } |
3213 | impl From<PlaceholderPat> for Pat { | 3278 | impl From<Static> for ExternItem { |
3214 | fn from(node: PlaceholderPat) -> Pat { Pat::PlaceholderPat(node) } | 3279 | fn from(node: Static) -> ExternItem { ExternItem::Static(node) } |
3215 | } | 3280 | } |
3216 | impl From<DotDotPat> for Pat { | 3281 | impl From<MacroCall> for ExternItem { |
3217 | fn from(node: DotDotPat) -> Pat { Pat::DotDotPat(node) } | 3282 | fn from(node: MacroCall) -> ExternItem { ExternItem::MacroCall(node) } |
3218 | } | 3283 | } |
3219 | impl From<PathPat> for Pat { | 3284 | impl AstNode for ExternItem { |
3220 | fn from(node: PathPat) -> Pat { Pat::PathPat(node) } | ||
3221 | } | ||
3222 | impl From<RecordPat> for Pat { | ||
3223 | fn from(node: RecordPat) -> Pat { Pat::RecordPat(node) } | ||
3224 | } | ||
3225 | impl From<TupleStructPat> for Pat { | ||
3226 | fn from(node: TupleStructPat) -> Pat { Pat::TupleStructPat(node) } | ||
3227 | } | ||
3228 | impl From<TuplePat> for Pat { | ||
3229 | fn from(node: TuplePat) -> Pat { Pat::TuplePat(node) } | ||
3230 | } | ||
3231 | impl From<SlicePat> for Pat { | ||
3232 | fn from(node: SlicePat) -> Pat { Pat::SlicePat(node) } | ||
3233 | } | ||
3234 | impl From<RangePat> for Pat { | ||
3235 | fn from(node: RangePat) -> Pat { Pat::RangePat(node) } | ||
3236 | } | ||
3237 | impl From<LiteralPat> for Pat { | ||
3238 | fn from(node: LiteralPat) -> Pat { Pat::LiteralPat(node) } | ||
3239 | } | ||
3240 | impl From<MacroPat> for Pat { | ||
3241 | fn from(node: MacroPat) -> Pat { Pat::MacroPat(node) } | ||
3242 | } | ||
3243 | impl AstNode for Pat { | ||
3244 | fn can_cast(kind: SyntaxKind) -> bool { | 3285 | fn can_cast(kind: SyntaxKind) -> bool { |
3245 | match kind { | 3286 | match kind { |
3246 | OR_PAT | PAREN_PAT | REF_PAT | BOX_PAT | BIND_PAT | PLACEHOLDER_PAT | DOT_DOT_PAT | 3287 | FN | STATIC | MACRO_CALL => true, |
3247 | | PATH_PAT | RECORD_PAT | TUPLE_STRUCT_PAT | TUPLE_PAT | SLICE_PAT | RANGE_PAT | ||
3248 | | LITERAL_PAT | MACRO_PAT => true, | ||
3249 | _ => false, | 3288 | _ => false, |
3250 | } | 3289 | } |
3251 | } | 3290 | } |
3252 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 3291 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
3253 | let res = match syntax.kind() { | 3292 | let res = match syntax.kind() { |
3254 | OR_PAT => Pat::OrPat(OrPat { syntax }), | 3293 | FN => ExternItem::Fn(Fn { syntax }), |
3255 | PAREN_PAT => Pat::ParenPat(ParenPat { syntax }), | 3294 | STATIC => ExternItem::Static(Static { syntax }), |
3256 | REF_PAT => Pat::RefPat(RefPat { syntax }), | 3295 | MACRO_CALL => ExternItem::MacroCall(MacroCall { syntax }), |
3257 | BOX_PAT => Pat::BoxPat(BoxPat { syntax }), | ||
3258 | BIND_PAT => Pat::BindPat(BindPat { syntax }), | ||
3259 | PLACEHOLDER_PAT => Pat::PlaceholderPat(PlaceholderPat { syntax }), | ||
3260 | DOT_DOT_PAT => Pat::DotDotPat(DotDotPat { syntax }), | ||
3261 | PATH_PAT => Pat::PathPat(PathPat { syntax }), | ||
3262 | RECORD_PAT => Pat::RecordPat(RecordPat { syntax }), | ||
3263 | TUPLE_STRUCT_PAT => Pat::TupleStructPat(TupleStructPat { syntax }), | ||
3264 | TUPLE_PAT => Pat::TuplePat(TuplePat { syntax }), | ||
3265 | SLICE_PAT => Pat::SlicePat(SlicePat { syntax }), | ||
3266 | RANGE_PAT => Pat::RangePat(RangePat { syntax }), | ||
3267 | LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }), | ||
3268 | MACRO_PAT => Pat::MacroPat(MacroPat { syntax }), | ||
3269 | _ => return None, | 3296 | _ => return None, |
3270 | }; | 3297 | }; |
3271 | Some(res) | 3298 | Some(res) |
3272 | } | 3299 | } |
3273 | fn syntax(&self) -> &SyntaxNode { | 3300 | fn syntax(&self) -> &SyntaxNode { |
3274 | match self { | 3301 | match self { |
3275 | Pat::OrPat(it) => &it.syntax, | 3302 | ExternItem::Fn(it) => &it.syntax, |
3276 | Pat::ParenPat(it) => &it.syntax, | 3303 | ExternItem::Static(it) => &it.syntax, |
3277 | Pat::RefPat(it) => &it.syntax, | 3304 | ExternItem::MacroCall(it) => &it.syntax, |
3278 | Pat::BoxPat(it) => &it.syntax, | ||
3279 | Pat::BindPat(it) => &it.syntax, | ||
3280 | Pat::PlaceholderPat(it) => &it.syntax, | ||
3281 | Pat::DotDotPat(it) => &it.syntax, | ||
3282 | Pat::PathPat(it) => &it.syntax, | ||
3283 | Pat::RecordPat(it) => &it.syntax, | ||
3284 | Pat::TupleStructPat(it) => &it.syntax, | ||
3285 | Pat::TuplePat(it) => &it.syntax, | ||
3286 | Pat::SlicePat(it) => &it.syntax, | ||
3287 | Pat::RangePat(it) => &it.syntax, | ||
3288 | Pat::LiteralPat(it) => &it.syntax, | ||
3289 | Pat::MacroPat(it) => &it.syntax, | ||
3290 | } | 3305 | } |
3291 | } | 3306 | } |
3292 | } | 3307 | } |
3293 | impl From<LetStmt> for Stmt { | 3308 | impl From<LifetimeParam> for GenericParam { |
3294 | fn from(node: LetStmt) -> Stmt { Stmt::LetStmt(node) } | 3309 | fn from(node: LifetimeParam) -> GenericParam { GenericParam::LifetimeParam(node) } |
3295 | } | 3310 | } |
3296 | impl From<ExprStmt> for Stmt { | 3311 | impl From<TypeParam> for GenericParam { |
3297 | fn from(node: ExprStmt) -> Stmt { Stmt::ExprStmt(node) } | 3312 | fn from(node: TypeParam) -> GenericParam { GenericParam::TypeParam(node) } |
3298 | } | 3313 | } |
3299 | impl AstNode for Stmt { | 3314 | impl From<ConstParam> for GenericParam { |
3300 | fn can_cast(kind: SyntaxKind) -> bool { | 3315 | fn from(node: ConstParam) -> GenericParam { GenericParam::ConstParam(node) } |
3301 | match kind { | ||
3302 | LET_STMT | EXPR_STMT => true, | ||
3303 | _ => false, | ||
3304 | } | ||
3305 | } | ||
3306 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
3307 | let res = match syntax.kind() { | ||
3308 | LET_STMT => Stmt::LetStmt(LetStmt { syntax }), | ||
3309 | EXPR_STMT => Stmt::ExprStmt(ExprStmt { syntax }), | ||
3310 | _ => return None, | ||
3311 | }; | ||
3312 | Some(res) | ||
3313 | } | ||
3314 | fn syntax(&self) -> &SyntaxNode { | ||
3315 | match self { | ||
3316 | Stmt::LetStmt(it) => &it.syntax, | ||
3317 | Stmt::ExprStmt(it) => &it.syntax, | ||
3318 | } | ||
3319 | } | ||
3320 | } | ||
3321 | impl From<Literal> for AttrInput { | ||
3322 | fn from(node: Literal) -> AttrInput { AttrInput::Literal(node) } | ||
3323 | } | 3316 | } |
3324 | impl From<TokenTree> for AttrInput { | 3317 | impl AstNode for GenericParam { |
3325 | fn from(node: TokenTree) -> AttrInput { AttrInput::TokenTree(node) } | ||
3326 | } | ||
3327 | impl AstNode for AttrInput { | ||
3328 | fn can_cast(kind: SyntaxKind) -> bool { | 3318 | fn can_cast(kind: SyntaxKind) -> bool { |
3329 | match kind { | 3319 | match kind { |
3330 | LITERAL | TOKEN_TREE => true, | 3320 | LIFETIME_PARAM | TYPE_PARAM | CONST_PARAM => true, |
3331 | _ => false, | 3321 | _ => false, |
3332 | } | 3322 | } |
3333 | } | 3323 | } |
3334 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 3324 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
3335 | let res = match syntax.kind() { | 3325 | let res = match syntax.kind() { |
3336 | LITERAL => AttrInput::Literal(Literal { syntax }), | 3326 | LIFETIME_PARAM => GenericParam::LifetimeParam(LifetimeParam { syntax }), |
3337 | TOKEN_TREE => AttrInput::TokenTree(TokenTree { syntax }), | 3327 | TYPE_PARAM => GenericParam::TypeParam(TypeParam { syntax }), |
3328 | CONST_PARAM => GenericParam::ConstParam(ConstParam { syntax }), | ||
3338 | _ => return None, | 3329 | _ => return None, |
3339 | }; | 3330 | }; |
3340 | Some(res) | 3331 | Some(res) |
3341 | } | 3332 | } |
3342 | fn syntax(&self) -> &SyntaxNode { | 3333 | fn syntax(&self) -> &SyntaxNode { |
3343 | match self { | 3334 | match self { |
3344 | AttrInput::Literal(it) => &it.syntax, | 3335 | GenericParam::LifetimeParam(it) => &it.syntax, |
3345 | AttrInput::TokenTree(it) => &it.syntax, | 3336 | GenericParam::TypeParam(it) => &it.syntax, |
3337 | GenericParam::ConstParam(it) => &it.syntax, | ||
3346 | } | 3338 | } |
3347 | } | 3339 | } |
3348 | } | 3340 | } |
3349 | impl From<FnDef> for ExternItem { | 3341 | impl From<LetStmt> for Stmt { |
3350 | fn from(node: FnDef) -> ExternItem { ExternItem::FnDef(node) } | 3342 | fn from(node: LetStmt) -> Stmt { Stmt::LetStmt(node) } |
3351 | } | 3343 | } |
3352 | impl From<StaticDef> for ExternItem { | 3344 | impl From<ExprStmt> for Stmt { |
3353 | fn from(node: StaticDef) -> ExternItem { ExternItem::StaticDef(node) } | 3345 | fn from(node: ExprStmt) -> Stmt { Stmt::ExprStmt(node) } |
3354 | } | 3346 | } |
3355 | impl AstNode for ExternItem { | 3347 | impl AstNode for Stmt { |
3356 | fn can_cast(kind: SyntaxKind) -> bool { | 3348 | fn can_cast(kind: SyntaxKind) -> bool { |
3357 | match kind { | 3349 | match kind { |
3358 | FN_DEF | STATIC_DEF => true, | 3350 | LET_STMT | EXPR_STMT => true, |
3359 | _ => false, | 3351 | _ => false, |
3360 | } | 3352 | } |
3361 | } | 3353 | } |
3362 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 3354 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
3363 | let res = match syntax.kind() { | 3355 | let res = match syntax.kind() { |
3364 | FN_DEF => ExternItem::FnDef(FnDef { syntax }), | 3356 | LET_STMT => Stmt::LetStmt(LetStmt { syntax }), |
3365 | STATIC_DEF => ExternItem::StaticDef(StaticDef { syntax }), | 3357 | EXPR_STMT => Stmt::ExprStmt(ExprStmt { syntax }), |
3366 | _ => return None, | 3358 | _ => return None, |
3367 | }; | 3359 | }; |
3368 | Some(res) | 3360 | Some(res) |
3369 | } | 3361 | } |
3370 | fn syntax(&self) -> &SyntaxNode { | 3362 | fn syntax(&self) -> &SyntaxNode { |
3371 | match self { | 3363 | match self { |
3372 | ExternItem::FnDef(it) => &it.syntax, | 3364 | Stmt::LetStmt(it) => &it.syntax, |
3373 | ExternItem::StaticDef(it) => &it.syntax, | 3365 | Stmt::ExprStmt(it) => &it.syntax, |
3374 | } | 3366 | } |
3375 | } | 3367 | } |
3376 | } | 3368 | } |
3377 | impl From<StructDef> for AdtDef { | 3369 | impl From<Struct> for AdtDef { |
3378 | fn from(node: StructDef) -> AdtDef { AdtDef::StructDef(node) } | 3370 | fn from(node: Struct) -> AdtDef { AdtDef::Struct(node) } |
3379 | } | 3371 | } |
3380 | impl From<EnumDef> for AdtDef { | 3372 | impl From<Enum> for AdtDef { |
3381 | fn from(node: EnumDef) -> AdtDef { AdtDef::EnumDef(node) } | 3373 | fn from(node: Enum) -> AdtDef { AdtDef::Enum(node) } |
3382 | } | 3374 | } |
3383 | impl From<UnionDef> for AdtDef { | 3375 | impl From<Union> for AdtDef { |
3384 | fn from(node: UnionDef) -> AdtDef { AdtDef::UnionDef(node) } | 3376 | fn from(node: Union) -> AdtDef { AdtDef::Union(node) } |
3385 | } | 3377 | } |
3386 | impl AstNode for AdtDef { | 3378 | impl AstNode for AdtDef { |
3387 | fn can_cast(kind: SyntaxKind) -> bool { | 3379 | fn can_cast(kind: SyntaxKind) -> bool { |
3388 | match kind { | 3380 | match kind { |
3389 | STRUCT_DEF | ENUM_DEF | UNION_DEF => true, | 3381 | STRUCT | ENUM | UNION => true, |
3390 | _ => false, | 3382 | _ => false, |
3391 | } | 3383 | } |
3392 | } | 3384 | } |
3393 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 3385 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
3394 | let res = match syntax.kind() { | 3386 | let res = match syntax.kind() { |
3395 | STRUCT_DEF => AdtDef::StructDef(StructDef { syntax }), | 3387 | STRUCT => AdtDef::Struct(Struct { syntax }), |
3396 | ENUM_DEF => AdtDef::EnumDef(EnumDef { syntax }), | 3388 | ENUM => AdtDef::Enum(Enum { syntax }), |
3397 | UNION_DEF => AdtDef::UnionDef(UnionDef { syntax }), | 3389 | UNION => AdtDef::Union(Union { syntax }), |
3398 | _ => return None, | 3390 | _ => return None, |
3399 | }; | 3391 | }; |
3400 | Some(res) | 3392 | Some(res) |
3401 | } | 3393 | } |
3402 | fn syntax(&self) -> &SyntaxNode { | 3394 | fn syntax(&self) -> &SyntaxNode { |
3403 | match self { | 3395 | match self { |
3404 | AdtDef::StructDef(it) => &it.syntax, | 3396 | AdtDef::Struct(it) => &it.syntax, |
3405 | AdtDef::EnumDef(it) => &it.syntax, | 3397 | AdtDef::Enum(it) => &it.syntax, |
3406 | AdtDef::UnionDef(it) => &it.syntax, | 3398 | AdtDef::Union(it) => &it.syntax, |
3407 | } | 3399 | } |
3408 | } | 3400 | } |
3409 | } | 3401 | } |
@@ -3417,37 +3409,37 @@ impl std::fmt::Display for TypeRef { | |||
3417 | std::fmt::Display::fmt(self.syntax(), f) | 3409 | std::fmt::Display::fmt(self.syntax(), f) |
3418 | } | 3410 | } |
3419 | } | 3411 | } |
3420 | impl std::fmt::Display for FieldDefList { | 3412 | impl std::fmt::Display for Pat { |
3421 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3413 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3422 | std::fmt::Display::fmt(self.syntax(), f) | 3414 | std::fmt::Display::fmt(self.syntax(), f) |
3423 | } | 3415 | } |
3424 | } | 3416 | } |
3425 | impl std::fmt::Display for Expr { | 3417 | impl std::fmt::Display for FieldList { |
3426 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3418 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3427 | std::fmt::Display::fmt(self.syntax(), f) | 3419 | std::fmt::Display::fmt(self.syntax(), f) |
3428 | } | 3420 | } |
3429 | } | 3421 | } |
3430 | impl std::fmt::Display for AssocItem { | 3422 | impl std::fmt::Display for Expr { |
3431 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3423 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3432 | std::fmt::Display::fmt(self.syntax(), f) | 3424 | std::fmt::Display::fmt(self.syntax(), f) |
3433 | } | 3425 | } |
3434 | } | 3426 | } |
3435 | impl std::fmt::Display for Pat { | 3427 | impl std::fmt::Display for AssocItem { |
3436 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3428 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3437 | std::fmt::Display::fmt(self.syntax(), f) | 3429 | std::fmt::Display::fmt(self.syntax(), f) |
3438 | } | 3430 | } |
3439 | } | 3431 | } |
3440 | impl std::fmt::Display for Stmt { | 3432 | impl std::fmt::Display for ExternItem { |
3441 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3433 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3442 | std::fmt::Display::fmt(self.syntax(), f) | 3434 | std::fmt::Display::fmt(self.syntax(), f) |
3443 | } | 3435 | } |
3444 | } | 3436 | } |
3445 | impl std::fmt::Display for AttrInput { | 3437 | impl std::fmt::Display for GenericParam { |
3446 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3438 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3447 | std::fmt::Display::fmt(self.syntax(), f) | 3439 | std::fmt::Display::fmt(self.syntax(), f) |
3448 | } | 3440 | } |
3449 | } | 3441 | } |
3450 | impl std::fmt::Display for ExternItem { | 3442 | impl std::fmt::Display for Stmt { |
3451 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3443 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3452 | std::fmt::Display::fmt(self.syntax(), f) | 3444 | std::fmt::Display::fmt(self.syntax(), f) |
3453 | } | 3445 | } |
@@ -3467,12 +3459,12 @@ impl std::fmt::Display for Attr { | |||
3467 | std::fmt::Display::fmt(self.syntax(), f) | 3459 | std::fmt::Display::fmt(self.syntax(), f) |
3468 | } | 3460 | } |
3469 | } | 3461 | } |
3470 | impl std::fmt::Display for ConstDef { | 3462 | impl std::fmt::Display for Const { |
3471 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3463 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3472 | std::fmt::Display::fmt(self.syntax(), f) | 3464 | std::fmt::Display::fmt(self.syntax(), f) |
3473 | } | 3465 | } |
3474 | } | 3466 | } |
3475 | impl std::fmt::Display for EnumDef { | 3467 | impl std::fmt::Display for Enum { |
3476 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3468 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3477 | std::fmt::Display::fmt(self.syntax(), f) | 3469 | std::fmt::Display::fmt(self.syntax(), f) |
3478 | } | 3470 | } |
@@ -3487,12 +3479,12 @@ impl std::fmt::Display for ExternCrate { | |||
3487 | std::fmt::Display::fmt(self.syntax(), f) | 3479 | std::fmt::Display::fmt(self.syntax(), f) |
3488 | } | 3480 | } |
3489 | } | 3481 | } |
3490 | impl std::fmt::Display for FnDef { | 3482 | impl std::fmt::Display for Fn { |
3491 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3483 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3492 | std::fmt::Display::fmt(self.syntax(), f) | 3484 | std::fmt::Display::fmt(self.syntax(), f) |
3493 | } | 3485 | } |
3494 | } | 3486 | } |
3495 | impl std::fmt::Display for ImplDef { | 3487 | impl std::fmt::Display for Impl { |
3496 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3488 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3497 | std::fmt::Display::fmt(self.syntax(), f) | 3489 | std::fmt::Display::fmt(self.syntax(), f) |
3498 | } | 3490 | } |
@@ -3507,27 +3499,27 @@ impl std::fmt::Display for Module { | |||
3507 | std::fmt::Display::fmt(self.syntax(), f) | 3499 | std::fmt::Display::fmt(self.syntax(), f) |
3508 | } | 3500 | } |
3509 | } | 3501 | } |
3510 | impl std::fmt::Display for StaticDef { | 3502 | impl std::fmt::Display for Static { |
3511 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3503 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3512 | std::fmt::Display::fmt(self.syntax(), f) | 3504 | std::fmt::Display::fmt(self.syntax(), f) |
3513 | } | 3505 | } |
3514 | } | 3506 | } |
3515 | impl std::fmt::Display for StructDef { | 3507 | impl std::fmt::Display for Struct { |
3516 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3508 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3517 | std::fmt::Display::fmt(self.syntax(), f) | 3509 | std::fmt::Display::fmt(self.syntax(), f) |
3518 | } | 3510 | } |
3519 | } | 3511 | } |
3520 | impl std::fmt::Display for TraitDef { | 3512 | impl std::fmt::Display for Trait { |
3521 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3513 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3522 | std::fmt::Display::fmt(self.syntax(), f) | 3514 | std::fmt::Display::fmt(self.syntax(), f) |
3523 | } | 3515 | } |
3524 | } | 3516 | } |
3525 | impl std::fmt::Display for TypeAliasDef { | 3517 | impl std::fmt::Display for TypeAlias { |
3526 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3518 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3527 | std::fmt::Display::fmt(self.syntax(), f) | 3519 | std::fmt::Display::fmt(self.syntax(), f) |
3528 | } | 3520 | } |
3529 | } | 3521 | } |
3530 | impl std::fmt::Display for UnionDef { | 3522 | impl std::fmt::Display for Union { |
3531 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3523 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3532 | std::fmt::Display::fmt(self.syntax(), f) | 3524 | std::fmt::Display::fmt(self.syntax(), f) |
3533 | } | 3525 | } |
@@ -3582,7 +3574,7 @@ impl std::fmt::Display for Abi { | |||
3582 | std::fmt::Display::fmt(self.syntax(), f) | 3574 | std::fmt::Display::fmt(self.syntax(), f) |
3583 | } | 3575 | } |
3584 | } | 3576 | } |
3585 | impl std::fmt::Display for TypeParamList { | 3577 | impl std::fmt::Display for GenericParamList { |
3586 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3578 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3587 | std::fmt::Display::fmt(self.syntax(), f) | 3579 | std::fmt::Display::fmt(self.syntax(), f) |
3588 | } | 3580 | } |
@@ -3607,37 +3599,47 @@ impl std::fmt::Display for BlockExpr { | |||
3607 | std::fmt::Display::fmt(self.syntax(), f) | 3599 | std::fmt::Display::fmt(self.syntax(), f) |
3608 | } | 3600 | } |
3609 | } | 3601 | } |
3610 | impl std::fmt::Display for RecordFieldDefList { | 3602 | impl std::fmt::Display for SelfParam { |
3611 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3603 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3612 | std::fmt::Display::fmt(self.syntax(), f) | 3604 | std::fmt::Display::fmt(self.syntax(), f) |
3613 | } | 3605 | } |
3614 | } | 3606 | } |
3615 | impl std::fmt::Display for TupleFieldDefList { | 3607 | impl std::fmt::Display for Param { |
3616 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3608 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3617 | std::fmt::Display::fmt(self.syntax(), f) | 3609 | std::fmt::Display::fmt(self.syntax(), f) |
3618 | } | 3610 | } |
3619 | } | 3611 | } |
3620 | impl std::fmt::Display for RecordFieldDef { | 3612 | impl std::fmt::Display for TypeBoundList { |
3621 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3613 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3622 | std::fmt::Display::fmt(self.syntax(), f) | 3614 | std::fmt::Display::fmt(self.syntax(), f) |
3623 | } | 3615 | } |
3624 | } | 3616 | } |
3625 | impl std::fmt::Display for TupleFieldDef { | 3617 | impl std::fmt::Display for RecordFieldList { |
3626 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3618 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3627 | std::fmt::Display::fmt(self.syntax(), f) | 3619 | std::fmt::Display::fmt(self.syntax(), f) |
3628 | } | 3620 | } |
3629 | } | 3621 | } |
3630 | impl std::fmt::Display for EnumVariantList { | 3622 | impl std::fmt::Display for TupleFieldList { |
3631 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3623 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3632 | std::fmt::Display::fmt(self.syntax(), f) | 3624 | std::fmt::Display::fmt(self.syntax(), f) |
3633 | } | 3625 | } |
3634 | } | 3626 | } |
3635 | impl std::fmt::Display for EnumVariant { | 3627 | impl std::fmt::Display for RecordField { |
3636 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3628 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3637 | std::fmt::Display::fmt(self.syntax(), f) | 3629 | std::fmt::Display::fmt(self.syntax(), f) |
3638 | } | 3630 | } |
3639 | } | 3631 | } |
3640 | impl std::fmt::Display for TypeBoundList { | 3632 | impl std::fmt::Display for TupleField { |
3633 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
3634 | std::fmt::Display::fmt(self.syntax(), f) | ||
3635 | } | ||
3636 | } | ||
3637 | impl std::fmt::Display for VariantList { | ||
3638 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
3639 | std::fmt::Display::fmt(self.syntax(), f) | ||
3640 | } | ||
3641 | } | ||
3642 | impl std::fmt::Display for Variant { | ||
3641 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3643 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3642 | std::fmt::Display::fmt(self.syntax(), f) | 3644 | std::fmt::Display::fmt(self.syntax(), f) |
3643 | } | 3645 | } |
@@ -3647,6 +3649,36 @@ impl std::fmt::Display for AssocItemList { | |||
3647 | std::fmt::Display::fmt(self.syntax(), f) | 3649 | std::fmt::Display::fmt(self.syntax(), f) |
3648 | } | 3650 | } |
3649 | } | 3651 | } |
3652 | impl std::fmt::Display for ExternItemList { | ||
3653 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
3654 | std::fmt::Display::fmt(self.syntax(), f) | ||
3655 | } | ||
3656 | } | ||
3657 | impl std::fmt::Display for LifetimeParam { | ||
3658 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
3659 | std::fmt::Display::fmt(self.syntax(), f) | ||
3660 | } | ||
3661 | } | ||
3662 | impl std::fmt::Display for TypeParam { | ||
3663 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
3664 | std::fmt::Display::fmt(self.syntax(), f) | ||
3665 | } | ||
3666 | } | ||
3667 | impl std::fmt::Display for ConstParam { | ||
3668 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
3669 | std::fmt::Display::fmt(self.syntax(), f) | ||
3670 | } | ||
3671 | } | ||
3672 | impl std::fmt::Display for Literal { | ||
3673 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
3674 | std::fmt::Display::fmt(self.syntax(), f) | ||
3675 | } | ||
3676 | } | ||
3677 | impl std::fmt::Display for TokenTree { | ||
3678 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
3679 | std::fmt::Display::fmt(self.syntax(), f) | ||
3680 | } | ||
3681 | } | ||
3650 | impl std::fmt::Display for ParenType { | 3682 | impl std::fmt::Display for ParenType { |
3651 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3683 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3652 | std::fmt::Display::fmt(self.syntax(), f) | 3684 | std::fmt::Display::fmt(self.syntax(), f) |
@@ -3857,11 +3889,6 @@ impl std::fmt::Display for BinExpr { | |||
3857 | std::fmt::Display::fmt(self.syntax(), f) | 3889 | std::fmt::Display::fmt(self.syntax(), f) |
3858 | } | 3890 | } |
3859 | } | 3891 | } |
3860 | impl std::fmt::Display for Literal { | ||
3861 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
3862 | std::fmt::Display::fmt(self.syntax(), f) | ||
3863 | } | ||
3864 | } | ||
3865 | impl std::fmt::Display for MatchExpr { | 3892 | impl std::fmt::Display for MatchExpr { |
3866 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3893 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3867 | std::fmt::Display::fmt(self.syntax(), f) | 3894 | std::fmt::Display::fmt(self.syntax(), f) |
@@ -3882,17 +3909,17 @@ impl std::fmt::Display for MatchGuard { | |||
3882 | std::fmt::Display::fmt(self.syntax(), f) | 3909 | std::fmt::Display::fmt(self.syntax(), f) |
3883 | } | 3910 | } |
3884 | } | 3911 | } |
3885 | impl std::fmt::Display for RecordLit { | 3912 | impl std::fmt::Display for RecordExpr { |
3886 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3913 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3887 | std::fmt::Display::fmt(self.syntax(), f) | 3914 | std::fmt::Display::fmt(self.syntax(), f) |
3888 | } | 3915 | } |
3889 | } | 3916 | } |
3890 | impl std::fmt::Display for RecordFieldList { | 3917 | impl std::fmt::Display for RecordExprFieldList { |
3891 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3918 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3892 | std::fmt::Display::fmt(self.syntax(), f) | 3919 | std::fmt::Display::fmt(self.syntax(), f) |
3893 | } | 3920 | } |
3894 | } | 3921 | } |
3895 | impl std::fmt::Display for RecordField { | 3922 | impl std::fmt::Display for RecordExprField { |
3896 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3923 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3897 | std::fmt::Display::fmt(self.syntax(), f) | 3924 | std::fmt::Display::fmt(self.syntax(), f) |
3898 | } | 3925 | } |
@@ -3982,11 +4009,6 @@ impl std::fmt::Display for TuplePat { | |||
3982 | std::fmt::Display::fmt(self.syntax(), f) | 4009 | std::fmt::Display::fmt(self.syntax(), f) |
3983 | } | 4010 | } |
3984 | } | 4011 | } |
3985 | impl std::fmt::Display for TokenTree { | ||
3986 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
3987 | std::fmt::Display::fmt(self.syntax(), f) | ||
3988 | } | ||
3989 | } | ||
3990 | impl std::fmt::Display for MacroDef { | 4012 | impl std::fmt::Display for MacroDef { |
3991 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 4013 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3992 | std::fmt::Display::fmt(self.syntax(), f) | 4014 | std::fmt::Display::fmt(self.syntax(), f) |
@@ -4002,21 +4024,6 @@ impl std::fmt::Display for MacroStmts { | |||
4002 | std::fmt::Display::fmt(self.syntax(), f) | 4024 | std::fmt::Display::fmt(self.syntax(), f) |
4003 | } | 4025 | } |
4004 | } | 4026 | } |
4005 | impl std::fmt::Display for TypeParam { | ||
4006 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
4007 | std::fmt::Display::fmt(self.syntax(), f) | ||
4008 | } | ||
4009 | } | ||
4010 | impl std::fmt::Display for LifetimeParam { | ||
4011 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
4012 | std::fmt::Display::fmt(self.syntax(), f) | ||
4013 | } | ||
4014 | } | ||
4015 | impl std::fmt::Display for ConstParam { | ||
4016 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
4017 | std::fmt::Display::fmt(self.syntax(), f) | ||
4018 | } | ||
4019 | } | ||
4020 | impl std::fmt::Display for TypeBound { | 4027 | impl std::fmt::Display for TypeBound { |
4021 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 4028 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
4022 | std::fmt::Display::fmt(self.syntax(), f) | 4029 | std::fmt::Display::fmt(self.syntax(), f) |
@@ -4037,16 +4044,6 @@ impl std::fmt::Display for LetStmt { | |||
4037 | std::fmt::Display::fmt(self.syntax(), f) | 4044 | std::fmt::Display::fmt(self.syntax(), f) |
4038 | } | 4045 | } |
4039 | } | 4046 | } |
4040 | impl std::fmt::Display for SelfParam { | ||
4041 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
4042 | std::fmt::Display::fmt(self.syntax(), f) | ||
4043 | } | ||
4044 | } | ||
4045 | impl std::fmt::Display for Param { | ||
4046 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
4047 | std::fmt::Display::fmt(self.syntax(), f) | ||
4048 | } | ||
4049 | } | ||
4050 | impl std::fmt::Display for PathSegment { | 4047 | impl std::fmt::Display for PathSegment { |
4051 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 4048 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
4052 | std::fmt::Display::fmt(self.syntax(), f) | 4049 | std::fmt::Display::fmt(self.syntax(), f) |
@@ -4072,13 +4069,3 @@ impl std::fmt::Display for ConstArg { | |||
4072 | std::fmt::Display::fmt(self.syntax(), f) | 4069 | std::fmt::Display::fmt(self.syntax(), f) |
4073 | } | 4070 | } |
4074 | } | 4071 | } |
4075 | impl std::fmt::Display for ExternItemList { | ||
4076 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
4077 | std::fmt::Display::fmt(self.syntax(), f) | ||
4078 | } | ||
4079 | } | ||
4080 | impl std::fmt::Display for MetaItem { | ||
4081 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
4082 | std::fmt::Display::fmt(self.syntax(), f) | ||
4083 | } | ||
4084 | } | ||
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs index 0ff69bc2d..509e8ae7a 100644 --- a/crates/ra_syntax/src/ast/make.rs +++ b/crates/ra_syntax/src/ast/make.rs | |||
@@ -64,18 +64,18 @@ pub fn use_item(use_tree: ast::UseTree) -> ast::Use { | |||
64 | ast_from_text(&format!("use {};", use_tree)) | 64 | ast_from_text(&format!("use {};", use_tree)) |
65 | } | 65 | } |
66 | 66 | ||
67 | pub fn record_field(name: ast::NameRef, expr: Option<ast::Expr>) -> ast::RecordField { | 67 | pub fn record_field(name: ast::NameRef, expr: Option<ast::Expr>) -> ast::RecordExprField { |
68 | return match expr { | 68 | return match expr { |
69 | Some(expr) => from_text(&format!("{}: {}", name, expr)), | 69 | Some(expr) => from_text(&format!("{}: {}", name, expr)), |
70 | None => from_text(&name.to_string()), | 70 | None => from_text(&name.to_string()), |
71 | }; | 71 | }; |
72 | 72 | ||
73 | fn from_text(text: &str) -> ast::RecordField { | 73 | fn from_text(text: &str) -> ast::RecordExprField { |
74 | ast_from_text(&format!("fn f() {{ S {{ {}, }} }}", text)) | 74 | ast_from_text(&format!("fn f() {{ S {{ {}, }} }}", text)) |
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 | ||
@@ -291,10 +291,10 @@ pub fn visibility_pub_crate() -> ast::Visibility { | |||
291 | pub fn fn_def( | 291 | pub fn fn_def( |
292 | visibility: Option<ast::Visibility>, | 292 | visibility: Option<ast::Visibility>, |
293 | fn_name: ast::Name, | 293 | fn_name: ast::Name, |
294 | type_params: Option<ast::TypeParamList>, | 294 | type_params: Option<ast::GenericParamList>, |
295 | params: ast::ParamList, | 295 | params: ast::ParamList, |
296 | body: ast::BlockExpr, | 296 | body: ast::BlockExpr, |
297 | ) -> ast::FnDef { | 297 | ) -> ast::Fn { |
298 | let type_params = | 298 | let type_params = |
299 | if let Some(type_params) = type_params { format!("<{}>", type_params) } else { "".into() }; | 299 | if let Some(type_params) = type_params { format!("<{}>", type_params) } else { "".into() }; |
300 | let visibility = match visibility { | 300 | let visibility = match visibility { |
diff --git a/crates/ra_syntax/src/ast/node_ext.rs b/crates/ra_syntax/src/ast/node_ext.rs index 242900643..bba7310ad 100644 --- a/crates/ra_syntax/src/ast/node_ext.rs +++ b/crates/ra_syntax/src/ast/node_ext.rs | |||
@@ -7,7 +7,7 @@ use itertools::Itertools; | |||
7 | use ra_parser::SyntaxKind; | 7 | use ra_parser::SyntaxKind; |
8 | 8 | ||
9 | use crate::{ | 9 | use crate::{ |
10 | ast::{self, support, AstNode, AttrInput, NameOwner, SyntaxNode}, | 10 | ast::{self, support, AstNode, NameOwner, SyntaxNode}, |
11 | SmolStr, SyntaxElement, SyntaxToken, T, | 11 | SmolStr, SyntaxElement, SyntaxToken, T, |
12 | }; | 12 | }; |
13 | 13 | ||
@@ -39,29 +39,23 @@ pub enum AttrKind { | |||
39 | 39 | ||
40 | impl ast::Attr { | 40 | impl ast::Attr { |
41 | pub fn as_simple_atom(&self) -> Option<SmolStr> { | 41 | pub fn as_simple_atom(&self) -> Option<SmolStr> { |
42 | match self.input() { | 42 | if self.eq_token().is_some() || self.token_tree().is_some() { |
43 | None => self.simple_name(), | 43 | return None; |
44 | Some(_) => None, | ||
45 | } | 44 | } |
45 | self.simple_name() | ||
46 | } | 46 | } |
47 | 47 | ||
48 | pub fn as_simple_call(&self) -> Option<(SmolStr, ast::TokenTree)> { | 48 | pub fn as_simple_call(&self) -> Option<(SmolStr, ast::TokenTree)> { |
49 | match self.input() { | 49 | let tt = self.token_tree()?; |
50 | Some(AttrInput::TokenTree(tt)) => Some((self.simple_name()?, tt)), | 50 | Some((self.simple_name()?, tt)) |
51 | _ => None, | ||
52 | } | ||
53 | } | 51 | } |
54 | 52 | ||
55 | pub fn as_simple_key_value(&self) -> Option<(SmolStr, SmolStr)> { | 53 | pub fn as_simple_key_value(&self) -> Option<(SmolStr, SmolStr)> { |
56 | match self.input() { | 54 | let lit = self.literal()?; |
57 | Some(AttrInput::Literal(lit)) => { | 55 | let key = self.simple_name()?; |
58 | let key = self.simple_name()?; | 56 | // FIXME: escape? raw string? |
59 | // FIXME: escape? raw string? | 57 | let value = lit.syntax().first_token()?.text().trim_matches('"').into(); |
60 | let value = lit.syntax().first_token()?.text().trim_matches('"').into(); | 58 | Some((key, value)) |
61 | Some((key, value)) | ||
62 | } | ||
63 | _ => None, | ||
64 | } | ||
65 | } | 59 | } |
66 | 60 | ||
67 | pub fn simple_name(&self) -> Option<SmolStr> { | 61 | pub fn simple_name(&self) -> Option<SmolStr> { |
@@ -141,7 +135,7 @@ impl ast::UseTreeList { | |||
141 | } | 135 | } |
142 | } | 136 | } |
143 | 137 | ||
144 | impl ast::ImplDef { | 138 | impl ast::Impl { |
145 | pub fn target_type(&self) -> Option<ast::TypeRef> { | 139 | pub fn target_type(&self) -> Option<ast::TypeRef> { |
146 | match self.target() { | 140 | match self.target() { |
147 | (Some(t), None) | (_, Some(t)) => Some(t), | 141 | (Some(t), None) | (_, Some(t)) => Some(t), |
@@ -166,16 +160,16 @@ impl ast::ImplDef { | |||
166 | 160 | ||
167 | #[derive(Debug, Clone, PartialEq, Eq)] | 161 | #[derive(Debug, Clone, PartialEq, Eq)] |
168 | pub enum StructKind { | 162 | pub enum StructKind { |
169 | Record(ast::RecordFieldDefList), | 163 | Record(ast::RecordFieldList), |
170 | Tuple(ast::TupleFieldDefList), | 164 | Tuple(ast::TupleFieldList), |
171 | Unit, | 165 | Unit, |
172 | } | 166 | } |
173 | 167 | ||
174 | impl StructKind { | 168 | impl StructKind { |
175 | fn from_node<N: AstNode>(node: &N) -> StructKind { | 169 | fn from_node<N: AstNode>(node: &N) -> StructKind { |
176 | if let Some(nfdl) = support::child::<ast::RecordFieldDefList>(node.syntax()) { | 170 | if let Some(nfdl) = support::child::<ast::RecordFieldList>(node.syntax()) { |
177 | StructKind::Record(nfdl) | 171 | StructKind::Record(nfdl) |
178 | } else if let Some(pfl) = support::child::<ast::TupleFieldDefList>(node.syntax()) { | 172 | } else if let Some(pfl) = support::child::<ast::TupleFieldList>(node.syntax()) { |
179 | StructKind::Tuple(pfl) | 173 | StructKind::Tuple(pfl) |
180 | } else { | 174 | } else { |
181 | StructKind::Unit | 175 | StructKind::Unit |
@@ -183,17 +177,17 @@ impl StructKind { | |||
183 | } | 177 | } |
184 | } | 178 | } |
185 | 179 | ||
186 | impl ast::StructDef { | 180 | impl ast::Struct { |
187 | pub fn kind(&self) -> StructKind { | 181 | pub fn kind(&self) -> StructKind { |
188 | StructKind::from_node(self) | 182 | StructKind::from_node(self) |
189 | } | 183 | } |
190 | } | 184 | } |
191 | 185 | ||
192 | impl ast::RecordField { | 186 | impl ast::RecordExprField { |
193 | pub fn for_field_name(field_name: &ast::NameRef) -> Option<ast::RecordField> { | 187 | pub fn for_field_name(field_name: &ast::NameRef) -> Option<ast::RecordExprField> { |
194 | let candidate = | 188 | let candidate = |
195 | field_name.syntax().parent().and_then(ast::RecordField::cast).or_else(|| { | 189 | field_name.syntax().parent().and_then(ast::RecordExprField::cast).or_else(|| { |
196 | field_name.syntax().ancestors().nth(4).and_then(ast::RecordField::cast) | 190 | field_name.syntax().ancestors().nth(4).and_then(ast::RecordExprField::cast) |
197 | })?; | 191 | })?; |
198 | if candidate.field_name().as_ref() == Some(field_name) { | 192 | if candidate.field_name().as_ref() == Some(field_name) { |
199 | Some(candidate) | 193 | Some(candidate) |
@@ -247,12 +241,12 @@ impl ast::RecordFieldPat { | |||
247 | } | 241 | } |
248 | } | 242 | } |
249 | 243 | ||
250 | impl ast::EnumVariant { | 244 | impl ast::Variant { |
251 | pub fn parent_enum(&self) -> ast::EnumDef { | 245 | pub fn parent_enum(&self) -> ast::Enum { |
252 | self.syntax() | 246 | self.syntax() |
253 | .parent() | 247 | .parent() |
254 | .and_then(|it| it.parent()) | 248 | .and_then(|it| it.parent()) |
255 | .and_then(ast::EnumDef::cast) | 249 | .and_then(ast::Enum::cast) |
256 | .expect("EnumVariants are always nested in Enums") | 250 | .expect("EnumVariants are always nested in Enums") |
257 | } | 251 | } |
258 | pub fn kind(&self) -> StructKind { | 252 | pub fn kind(&self) -> StructKind { |
@@ -473,18 +467,39 @@ impl ast::TokenTree { | |||
473 | } | 467 | } |
474 | } | 468 | } |
475 | 469 | ||
470 | impl ast::GenericParamList { | ||
471 | pub fn lifetime_params(&self) -> impl Iterator<Item = ast::LifetimeParam> { | ||
472 | self.generic_params().filter_map(|param| match param { | ||
473 | ast::GenericParam::LifetimeParam(it) => Some(it), | ||
474 | ast::GenericParam::TypeParam(_) | ast::GenericParam::ConstParam(_) => None, | ||
475 | }) | ||
476 | } | ||
477 | pub fn type_params(&self) -> impl Iterator<Item = ast::TypeParam> { | ||
478 | self.generic_params().filter_map(|param| match param { | ||
479 | ast::GenericParam::TypeParam(it) => Some(it), | ||
480 | ast::GenericParam::LifetimeParam(_) | ast::GenericParam::ConstParam(_) => None, | ||
481 | }) | ||
482 | } | ||
483 | pub fn const_params(&self) -> impl Iterator<Item = ast::ConstParam> { | ||
484 | self.generic_params().filter_map(|param| match param { | ||
485 | ast::GenericParam::ConstParam(it) => Some(it), | ||
486 | ast::GenericParam::TypeParam(_) | ast::GenericParam::LifetimeParam(_) => None, | ||
487 | }) | ||
488 | } | ||
489 | } | ||
490 | |||
476 | impl ast::DocCommentsOwner for ast::SourceFile {} | 491 | impl ast::DocCommentsOwner for ast::SourceFile {} |
477 | impl ast::DocCommentsOwner for ast::FnDef {} | 492 | impl ast::DocCommentsOwner for ast::Fn {} |
478 | impl ast::DocCommentsOwner for ast::StructDef {} | 493 | impl ast::DocCommentsOwner for ast::Struct {} |
479 | impl ast::DocCommentsOwner for ast::UnionDef {} | 494 | impl ast::DocCommentsOwner for ast::Union {} |
480 | impl ast::DocCommentsOwner for ast::RecordFieldDef {} | 495 | impl ast::DocCommentsOwner for ast::RecordField {} |
481 | impl ast::DocCommentsOwner for ast::TupleFieldDef {} | 496 | impl ast::DocCommentsOwner for ast::TupleField {} |
482 | impl ast::DocCommentsOwner for ast::EnumDef {} | 497 | impl ast::DocCommentsOwner for ast::Enum {} |
483 | impl ast::DocCommentsOwner for ast::EnumVariant {} | 498 | impl ast::DocCommentsOwner for ast::Variant {} |
484 | impl ast::DocCommentsOwner for ast::TraitDef {} | 499 | impl ast::DocCommentsOwner for ast::Trait {} |
485 | impl ast::DocCommentsOwner for ast::Module {} | 500 | impl ast::DocCommentsOwner for ast::Module {} |
486 | impl ast::DocCommentsOwner for ast::StaticDef {} | 501 | impl ast::DocCommentsOwner for ast::Static {} |
487 | impl ast::DocCommentsOwner for ast::ConstDef {} | 502 | impl ast::DocCommentsOwner for ast::Const {} |
488 | impl ast::DocCommentsOwner for ast::TypeAliasDef {} | 503 | impl ast::DocCommentsOwner for ast::TypeAlias {} |
489 | impl ast::DocCommentsOwner for ast::ImplDef {} | 504 | impl ast::DocCommentsOwner for ast::Impl {} |
490 | impl ast::DocCommentsOwner for ast::MacroCall {} | 505 | impl ast::DocCommentsOwner for ast::MacroCall {} |
diff --git a/crates/ra_syntax/src/ast/traits.rs b/crates/ra_syntax/src/ast/traits.rs index 9fe0b93c1..3a56b1674 100644 --- a/crates/ra_syntax/src/ast/traits.rs +++ b/crates/ra_syntax/src/ast/traits.rs | |||
@@ -9,12 +9,6 @@ use crate::{ | |||
9 | SyntaxToken, T, | 9 | SyntaxToken, T, |
10 | }; | 10 | }; |
11 | 11 | ||
12 | pub trait TypeAscriptionOwner: AstNode { | ||
13 | fn ascribed_type(&self) -> Option<ast::TypeRef> { | ||
14 | support::child(self.syntax()) | ||
15 | } | ||
16 | } | ||
17 | |||
18 | pub trait NameOwner: AstNode { | 12 | pub trait NameOwner: AstNode { |
19 | fn name(&self) -> Option<ast::Name> { | 13 | fn name(&self) -> Option<ast::Name> { |
20 | support::child(self.syntax()) | 14 | support::child(self.syntax()) |
@@ -49,8 +43,8 @@ pub trait ModuleItemOwner: AstNode { | |||
49 | } | 43 | } |
50 | } | 44 | } |
51 | 45 | ||
52 | pub trait TypeParamsOwner: AstNode { | 46 | pub trait GenericParamsOwner: AstNode { |
53 | fn type_param_list(&self) -> Option<ast::TypeParamList> { | 47 | fn generic_param_list(&self) -> Option<ast::GenericParamList> { |
54 | support::child(self.syntax()) | 48 | support::child(self.syntax()) |
55 | } | 49 | } |
56 | 50 | ||
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs index 219dd0b07..6203b6206 100644 --- a/crates/ra_syntax/src/lib.rs +++ b/crates/ra_syntax/src/lib.rs | |||
@@ -255,11 +255,11 @@ fn api_walkthrough() { | |||
255 | let mut func = None; | 255 | let mut func = None; |
256 | for item in file.items() { | 256 | for item in file.items() { |
257 | match item { | 257 | match item { |
258 | ast::Item::FnDef(f) => func = Some(f), | 258 | ast::Item::Fn(f) => func = Some(f), |
259 | _ => unreachable!(), | 259 | _ => unreachable!(), |
260 | } | 260 | } |
261 | } | 261 | } |
262 | let func: ast::FnDef = func.unwrap(); | 262 | let func: ast::Fn = func.unwrap(); |
263 | 263 | ||
264 | // Each AST node has a bunch of getters for children. All getters return | 264 | // Each AST node has a bunch of getters for children. All getters return |
265 | // `Option`s though, to account for incomplete code. Some getters are common | 265 | // `Option`s though, to account for incomplete code. Some getters are common |
@@ -316,7 +316,7 @@ fn api_walkthrough() { | |||
316 | ); | 316 | ); |
317 | 317 | ||
318 | // As well as some iterator helpers: | 318 | // As well as some iterator helpers: |
319 | let f = expr_syntax.ancestors().find_map(ast::FnDef::cast); | 319 | let f = expr_syntax.ancestors().find_map(ast::Fn::cast); |
320 | assert_eq!(f, Some(func)); | 320 | assert_eq!(f, Some(func)); |
321 | assert!(expr_syntax.siblings_with_tokens(Direction::Next).any(|it| it.kind() == T!['}'])); | 321 | assert!(expr_syntax.siblings_with_tokens(Direction::Next).any(|it| it.kind() == T!['}'])); |
322 | assert_eq!( | 322 | assert_eq!( |
diff --git a/crates/ra_syntax/src/parsing/text_tree_sink.rs b/crates/ra_syntax/src/parsing/text_tree_sink.rs index c6b30a02a..6d1828d20 100644 --- a/crates/ra_syntax/src/parsing/text_tree_sink.rs +++ b/crates/ra_syntax/src/parsing/text_tree_sink.rs | |||
@@ -146,8 +146,8 @@ fn n_attached_trivias<'a>( | |||
146 | trivias: impl Iterator<Item = (SyntaxKind, &'a str)>, | 146 | trivias: impl Iterator<Item = (SyntaxKind, &'a str)>, |
147 | ) -> usize { | 147 | ) -> usize { |
148 | match kind { | 148 | match kind { |
149 | MACRO_CALL | CONST_DEF | TYPE_ALIAS_DEF | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN_DEF | 149 | MACRO_CALL | CONST | TYPE_ALIAS | STRUCT | ENUM | VARIANT | FN | TRAIT | MODULE |
150 | | TRAIT_DEF | MODULE | RECORD_FIELD_DEF | STATIC_DEF => { | 150 | | RECORD_FIELD | STATIC => { |
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/src/validation.rs b/crates/ra_syntax/src/validation.rs index fdec48fb0..0325ab0b4 100644 --- a/crates/ra_syntax/src/validation.rs +++ b/crates/ra_syntax/src/validation.rs | |||
@@ -4,7 +4,7 @@ mod block; | |||
4 | 4 | ||
5 | use crate::{ | 5 | use crate::{ |
6 | ast, match_ast, AstNode, SyntaxError, | 6 | ast, match_ast, AstNode, SyntaxError, |
7 | SyntaxKind::{BYTE, BYTE_STRING, CHAR, CONST_DEF, FN_DEF, INT_NUMBER, STRING, TYPE_ALIAS_DEF}, | 7 | SyntaxKind::{BYTE, BYTE_STRING, CHAR, CONST, FN, INT_NUMBER, STRING, TYPE_ALIAS}, |
8 | SyntaxNode, SyntaxToken, TextSize, T, | 8 | SyntaxNode, SyntaxToken, TextSize, T, |
9 | }; | 9 | }; |
10 | use rustc_lexer::unescape::{ | 10 | use rustc_lexer::unescape::{ |
@@ -91,7 +91,7 @@ pub(crate) fn validate(root: &SyntaxNode) -> Vec<SyntaxError> { | |||
91 | ast::Literal(it) => validate_literal(it, &mut errors), | 91 | ast::Literal(it) => validate_literal(it, &mut errors), |
92 | ast::BlockExpr(it) => block::validate_block_expr(it, &mut errors), | 92 | ast::BlockExpr(it) => block::validate_block_expr(it, &mut errors), |
93 | ast::FieldExpr(it) => validate_numeric_name(it.name_ref(), &mut errors), | 93 | ast::FieldExpr(it) => validate_numeric_name(it.name_ref(), &mut errors), |
94 | ast::RecordField(it) => validate_numeric_name(it.name_ref(), &mut errors), | 94 | ast::RecordExprField(it) => validate_numeric_name(it.name_ref(), &mut errors), |
95 | ast::Visibility(it) => validate_visibility(it, &mut errors), | 95 | ast::Visibility(it) => validate_visibility(it, &mut errors), |
96 | ast::RangeExpr(it) => validate_range_expr(it, &mut errors), | 96 | ast::RangeExpr(it) => validate_range_expr(it, &mut errors), |
97 | ast::PathSegment(it) => validate_path_keywords(it, &mut errors), | 97 | ast::PathSegment(it) => validate_path_keywords(it, &mut errors), |
@@ -200,11 +200,11 @@ fn validate_visibility(vis: ast::Visibility, errors: &mut Vec<SyntaxError>) { | |||
200 | None => return, | 200 | None => return, |
201 | }; | 201 | }; |
202 | match parent.kind() { | 202 | match parent.kind() { |
203 | FN_DEF | CONST_DEF | TYPE_ALIAS_DEF => (), | 203 | FN | CONST | TYPE_ALIAS => (), |
204 | _ => return, | 204 | _ => return, |
205 | } | 205 | } |
206 | 206 | ||
207 | let impl_def = match parent.parent().and_then(|it| it.parent()).and_then(ast::ImplDef::cast) { | 207 | let impl_def = match parent.parent().and_then(|it| it.parent()).and_then(ast::Impl::cast) { |
208 | Some(it) => it, | 208 | Some(it) => it, |
209 | None => return, | 209 | None => return, |
210 | }; | 210 | }; |
diff --git a/crates/ra_syntax/src/validation/block.rs b/crates/ra_syntax/src/validation/block.rs index 2c08f7e6e..ad9901468 100644 --- a/crates/ra_syntax/src/validation/block.rs +++ b/crates/ra_syntax/src/validation/block.rs | |||
@@ -9,7 +9,7 @@ use crate::{ | |||
9 | pub(crate) fn validate_block_expr(block: ast::BlockExpr, errors: &mut Vec<SyntaxError>) { | 9 | pub(crate) fn validate_block_expr(block: ast::BlockExpr, errors: &mut Vec<SyntaxError>) { |
10 | if let Some(parent) = block.syntax().parent() { | 10 | if let Some(parent) = block.syntax().parent() { |
11 | match parent.kind() { | 11 | match parent.kind() { |
12 | FN_DEF | EXPR_STMT | BLOCK_EXPR => return, | 12 | FN | EXPR_STMT | BLOCK_EXPR => return, |
13 | _ => {} | 13 | _ => {} |
14 | } | 14 | } |
15 | } | 15 | } |
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..bbbf496c8 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 | |||
@@ -1,14 +1,14 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..34 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [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..6dc73bfdb 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 | |||
@@ -5,13 +5,13 @@ [email protected] | |||
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "match" | 6 | [email protected] "match" |
7 | [email protected] "\n\n" | 7 | [email protected] "\n\n" |
8 | STRUCT_DEF@10..21 | 8 | [email protected] |
9 | [email protected] "struct" | 9 | [email protected] "struct" |
10 | [email protected] " " | 10 | [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..7763fad84 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 | |||
@@ -1,14 +1,14 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..39 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [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/0005_attribute_recover.rast b/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rast index 375ed45e0..4845a6563 100644 --- a/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rast +++ b/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..31 | 2 | [email protected] |
3 | [email protected] | 3 | [email protected] |
4 | [email protected] "#" | 4 | [email protected] "#" |
5 | [email protected] "[" | 5 | [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..5f85c3943 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 | |||
@@ -1,14 +1,14 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..73 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [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/0007_stray_curly_in_file.rast b/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast index b72c92c33..560bfd751 100644 --- a/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast +++ b/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast | |||
@@ -2,7 +2,7 @@ [email protected] | |||
2 | [email protected] | 2 | [email protected] |
3 | [email protected] "}" | 3 | [email protected] "}" |
4 | [email protected] "\n\n" | 4 | [email protected] "\n\n" |
5 | STRUCT_DEF@3..12 | 5 | [email protected] |
6 | [email protected] "struct" | 6 | [email protected] "struct" |
7 | [email protected] " " | 7 | [email protected] " " |
8 | [email protected] | 8 | [email protected] |
@@ -12,7 +12,7 @@ [email protected] | |||
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "}" | 13 | [email protected] "}" |
14 | [email protected] "\n\n" | 14 | [email protected] "\n\n" |
15 | FN_DEF@17..27 | 15 | [email protected] |
16 | [email protected] "fn" | 16 | [email protected] "fn" |
17 | [email protected] " " | 17 | [email protected] " " |
18 | [email protected] | 18 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rast b/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rast index 33953d8d7..1e9637c26 100644 --- a/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rast +++ b/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..12 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -58,7 +58,7 @@ [email protected] | |||
58 | [email protected] "\n" | 58 | [email protected] "\n" |
59 | [email protected] "}" | 59 | [email protected] "}" |
60 | [email protected] "\n\n" | 60 | [email protected] "\n\n" |
61 | FN_DEF@82..94 | 61 | [email protected] |
62 | [email protected] "fn" | 62 | [email protected] "fn" |
63 | [email protected] " " | 63 | [email protected] " " |
64 | [email protected] | 64 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast b/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast index aca02ece4..dacf71aa1 100644 --- a/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast +++ b/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..11 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S" | 6 | [email protected] "S" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] "90" | 10 | [email protected] "90" |
@@ -38,7 +38,7 @@ [email protected] | |||
38 | [email protected] "\n" | 38 | [email protected] "\n" |
39 | [email protected] "}" | 39 | [email protected] "}" |
40 | [email protected] "\n\n" | 40 | [email protected] "\n\n" |
41 | STRUCT_DEF@33..42 | 41 | [email protected] |
42 | [email protected] "struct" | 42 | [email protected] "struct" |
43 | [email protected] " " | 43 | [email protected] " " |
44 | [email protected] | 44 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast index 3bf57eacc..1c3e0f65b 100644 --- a/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast +++ b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..41 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0011_extern_struct.rast b/crates/ra_syntax/test_data/parser/err/0011_extern_struct.rast index 87c54c32c..b02d390af 100644 --- a/crates/ra_syntax/test_data/parser/err/0011_extern_struct.rast +++ b/crates/ra_syntax/test_data/parser/err/0011_extern_struct.rast | |||
@@ -3,7 +3,7 @@ [email protected] | |||
3 | [email protected] | 3 | [email protected] |
4 | [email protected] "extern" | 4 | [email protected] "extern" |
5 | [email protected] " " | 5 | [email protected] " " |
6 | STRUCT_DEF@7..18 | 6 | [email protected] |
7 | [email protected] "struct" | 7 | [email protected] "struct" |
8 | [email protected] " " | 8 | [email protected] " " |
9 | [email protected] | 9 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast b/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast index e1e782f5f..d62906b99 100644 --- a/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast +++ b/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..389 | 2 | [email protected] |
3 | [email protected] | 3 | [email protected] |
4 | [email protected] | 4 | [email protected] |
5 | [email protected] | 5 | [email protected] |
@@ -10,7 +10,7 @@ [email protected] | |||
10 | [email protected] | 10 | [email protected] |
11 | [email protected] | 11 | [email protected] |
12 | [email protected] "process" | 12 | [email protected] "process" |
13 | TYP[email protected] | 13 | GENERIC[email protected] |
14 | [email protected] | 14 | [email protected] |
15 | [email protected] | 15 | [email protected] |
16 | [email protected] "'a" | 16 | [email protected] "'a" |
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..3eef848fc 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 | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..72 | 2 | [email protected] |
3 | [email protected] | 3 | [email protected] |
4 | [email protected] "pub" | 4 | [email protected] "pub" |
5 | [email protected] " " | 5 | [email protected] " " |
@@ -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/0014_where_no_bounds.rast b/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rast index 9323b7890..a1f39b22a 100644 --- a/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rast +++ b/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..22 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "foo" | 6 | [email protected] "foo" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rast b/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rast index b18378cff..a3c25b450 100644 --- a/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rast +++ b/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..7 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0016_missing_semi.rast b/crates/ra_syntax/test_data/parser/err/0016_missing_semi.rast index 93434f34f..66157c3dc 100644 --- a/crates/ra_syntax/test_data/parser/err/0016_missing_semi.rast +++ b/crates/ra_syntax/test_data/parser/err/0016_missing_semi.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..55 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rast b/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rast index 628315c78..bb4a28f4e 100644 --- a/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rast +++ b/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..46 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast index a87e5061a..bc95b8512 100644 --- a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast +++ b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..182 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -11,7 +11,7 @@ [email protected] | |||
11 | [email protected] | 11 | [email protected] |
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "\n " | 13 | [email protected] "\n " |
14 | FN_DEF@20..161 | 14 | [email protected] |
15 | [email protected] "fn" | 15 | [email protected] "fn" |
16 | [email protected] " " | 16 | [email protected] " " |
17 | [email protected] | 17 | [email protected] |
@@ -75,16 +75,16 @@ [email protected] | |||
75 | [email protected] "push" | 75 | [email protected] "push" |
76 | [email protected] | 76 | [email protected] |
77 | [email protected] "(" | 77 | [email protected] "(" |
78 | RECORD_LIT@111..154 | 78 | RECORD_EXPR@111..154 |
79 | [email protected] | 79 | [email protected] |
80 | [email protected] | 80 | [email protected] |
81 | [email protected] | 81 | [email protected] |
82 | [email protected] "ScopeData" | 82 | [email protected] "ScopeData" |
83 | [email protected] " " | 83 | [email protected] " " |
84 | [email protected] | 84 | RECORD_EXPR_[email protected] |
85 | [email protected] "{" | 85 | [email protected] "{" |
86 | [email protected] " " | 86 | [email protected] " " |
87 | [email protected] | 87 | RECORD_EXPR_[email protected] |
88 | [email protected] | 88 | [email protected] |
89 | [email protected] "parent" | 89 | [email protected] "parent" |
90 | [email protected] ":" | 90 | [email protected] ":" |
@@ -96,7 +96,7 @@ [email protected] | |||
96 | [email protected] "None" | 96 | [email protected] "None" |
97 | [email protected] "," | 97 | [email protected] "," |
98 | [email protected] " " | 98 | [email protected] " " |
99 | [email protected] | 99 | RECORD_EXPR_[email protected] |
100 | [email protected] | 100 | [email protected] |
101 | [email protected] "entries" | 101 | [email protected] "entries" |
102 | [email protected] ":" | 102 | [email protected] ":" |
@@ -116,7 +116,7 @@ [email protected] | |||
116 | [email protected] "\n " | 116 | [email protected] "\n " |
117 | [email protected] "}" | 117 | [email protected] "}" |
118 | [email protected] "\n\n " | 118 | [email protected] "\n\n " |
119 | FN_DEF@167..180 | 119 | [email protected] |
120 | [email protected] "fn" | 120 | [email protected] "fn" |
121 | [email protected] " " | 121 | [email protected] " " |
122 | [email protected] | 122 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0019_let_recover.rast b/crates/ra_syntax/test_data/parser/err/0019_let_recover.rast index 4ff27f5c8..f6fa964b7 100644 --- a/crates/ra_syntax/test_data/parser/err/0019_let_recover.rast +++ b/crates/ra_syntax/test_data/parser/err/0019_let_recover.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..138 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0020_fn_recover.rast b/crates/ra_syntax/test_data/parser/err/0020_fn_recover.rast index 5f3a31473..6f6feba5a 100644 --- a/crates/ra_syntax/test_data/parser/err/0020_fn_recover.rast +++ b/crates/ra_syntax/test_data/parser/err/0020_fn_recover.rast | |||
@@ -1,8 +1,8 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..2 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] "\n\n" | 4 | [email protected] "\n\n" |
5 | FN_DEF@4..15 | 5 | [email protected] |
6 | [email protected] "fn" | 6 | [email protected] "fn" |
7 | [email protected] " " | 7 | [email protected] " " |
8 | [email protected] | 8 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rast b/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rast index 1746bd3c1..ba4ce4795 100644 --- a/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rast +++ b/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..21 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast index 28146f44e..71fb19783 100644 --- a/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast +++ b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..33 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -28,7 +28,7 @@ [email protected] | |||
28 | [email protected] | 28 | [email protected] |
29 | [email protected] "," | 29 | [email protected] "," |
30 | [email protected] " " | 30 | [email protected] " " |
31 | STRUCT_DEF@19..26 | 31 | [email protected] |
32 | [email protected] "struct" | 32 | [email protected] "struct" |
33 | [email protected] | 33 | [email protected] |
34 | [email protected] "," | 34 | [email protected] "," |
@@ -40,7 +40,7 @@ [email protected] | |||
40 | [email protected] " " | 40 | [email protected] " " |
41 | [email protected] "}" | 41 | [email protected] "}" |
42 | [email protected] "\n" | 42 | [email protected] "\n" |
43 | FN_DEF@34..68 | 43 | [email protected] |
44 | [email protected] "fn" | 44 | [email protected] "fn" |
45 | [email protected] " " | 45 | [email protected] " " |
46 | [email protected] | 46 | [email protected] |
@@ -75,7 +75,7 @@ [email protected] | |||
75 | [email protected] | 75 | [email protected] |
76 | [email protected] "," | 76 | [email protected] "," |
77 | [email protected] " " | 77 | [email protected] " " |
78 | IMPL_DEF@56..60 | 78 | [email protected] |
79 | [email protected] "impl" | 79 | [email protected] "impl" |
80 | [email protected] | 80 | [email protected] |
81 | [email protected] | 81 | [email protected] |
@@ -88,7 +88,7 @@ [email protected] | |||
88 | [email protected] " " | 88 | [email protected] " " |
89 | [email protected] "}" | 89 | [email protected] "}" |
90 | [email protected] "\n" | 90 | [email protected] "\n" |
91 | FN_DEF@69..111 | 91 | [email protected] |
92 | [email protected] "fn" | 92 | [email protected] "fn" |
93 | [email protected] " " | 93 | [email protected] " " |
94 | [email protected] | 94 | [email protected] |
@@ -133,7 +133,7 @@ [email protected] | |||
133 | [email protected] | 133 | [email protected] |
134 | [email protected] "," | 134 | [email protected] "," |
135 | [email protected] " " | 135 | [email protected] " " |
136 | TRAIT_DEF@98..104 | 136 | [email protected] |
137 | [email protected] "trait" | 137 | [email protected] "trait" |
138 | [email protected] | 138 | [email protected] |
139 | [email protected] "," | 139 | [email protected] "," |
diff --git a/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rast b/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rast index 9ea9d715e..5ffefd742 100644 --- a/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rast +++ b/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..55 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast b/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast index 48610a5eb..4c2d1ad68 100644 --- a/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast +++ b/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..53 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "f" | 6 | [email protected] "f" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
@@ -39,7 +39,7 @@ [email protected] | |||
39 | [email protected] "(" | 39 | [email protected] "(" |
40 | [email protected] | 40 | [email protected] |
41 | [email protected] "for" | 41 | [email protected] "for" |
42 | TYP[email protected] | 42 | GENERIC[email protected] |
43 | [email protected] "<" | 43 | [email protected] "<" |
44 | [email protected] | 44 | [email protected] |
45 | [email protected] "\'a" | 45 | [email protected] "\'a" |
@@ -65,7 +65,7 @@ [email protected] | |||
65 | [email protected] "{" | 65 | [email protected] "{" |
66 | [email protected] "}" | 66 | [email protected] "}" |
67 | [email protected] "\n\n" | 67 | [email protected] "\n\n" |
68 | FN_DEF@55..239 | 68 | [email protected] |
69 | [email protected] "fn" | 69 | [email protected] "fn" |
70 | [email protected] " " | 70 | [email protected] " " |
71 | [email protected] | 71 | [email protected] |
@@ -122,7 +122,7 @@ [email protected] | |||
122 | [email protected] "(" | 122 | [email protected] "(" |
123 | [email protected] | 123 | [email protected] |
124 | [email protected] "for" | 124 | [email protected] "for" |
125 | TYP[email protected] | 125 | GENERIC[email protected] |
126 | [email protected] "<" | 126 | [email protected] "<" |
127 | [email protected] | 127 | [email protected] |
128 | [email protected] "\'a" | 128 | [email protected] "\'a" |
@@ -242,7 +242,7 @@ [email protected] | |||
242 | [email protected] "(" | 242 | [email protected] "(" |
243 | [email protected] | 243 | [email protected] |
244 | [email protected] "for" | 244 | [email protected] "for" |
245 | TYP[email protected] | 245 | GENERIC[email protected] |
246 | [email protected] "<" | 246 | [email protected] "<" |
247 | [email protected] | 247 | [email protected] |
248 | [email protected] "\'a" | 248 | [email protected] "\'a" |
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 88b086daf..fca646557 100644 --- a/crates/ra_syntax/test_data/parser/err/0025_nope.rast +++ b/crates/ra_syntax/test_data/parser/err/0025_nope.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..574 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -11,26 +11,26 @@ [email protected] | |||
11 | [email protected] | 11 | [email protected] |
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "\n " | 13 | [email protected] "\n " |
14 | ENUM_DEF@16..152 | 14 | [email protected] |
15 | [email protected] "enum" | 15 | [email protected] "enum" |
16 | [email protected] " " | 16 | [email protected] " " |
17 | [email protected] | 17 | [email protected] |
18 | [email protected] "Test" | 18 | [email protected] "Test" |
19 | [email protected] " " | 19 | [email protected] " " |
20 | ENUM_[email protected] | 20 | [email protected] |
21 | [email protected] "{" | 21 | [email protected] "{" |
22 | [email protected] "\n " | 22 | [email protected] "\n " |
23 | ENUM_[email protected] | 23 | [email protected] |
24 | [email protected] | 24 | [email protected] |
25 | [email protected] "Var1" | 25 | [email protected] "Var1" |
26 | [email protected] "," | 26 | [email protected] "," |
27 | [email protected] "\n " | 27 | [email protected] "\n " |
28 | ENUM_[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] |
@@ -39,14 +39,14 @@ [email protected] | |||
39 | [email protected] ")" | 39 | [email protected] ")" |
40 | [email protected] "," | 40 | [email protected] "," |
41 | [email protected] "\n " | 41 | [email protected] "\n " |
42 | ENUM_[email protected] | 42 | [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] ":" |
@@ -79,39 +79,39 @@ [email protected] | |||
79 | [email protected] "1" | 79 | [email protected] "1" |
80 | [email protected] ";" | 80 | [email protected] ";" |
81 | [email protected] "\n " | 81 | [email protected] "\n " |
82 | ENUM_DEF@191..223 | 82 | [email protected] |
83 | [email protected] "enum" | 83 | [email protected] "enum" |
84 | [email protected] " " | 84 | [email protected] " " |
85 | [email protected] | 85 | [email protected] |
86 | [email protected] "Test2" | 86 | [email protected] "Test2" |
87 | [email protected] " " | 87 | [email protected] " " |
88 | ENUM_[email protected] | 88 | [email protected] |
89 | [email protected] "{" | 89 | [email protected] "{" |
90 | [email protected] "\n " | 90 | [email protected] "\n " |
91 | ENUM_[email protected] | 91 | [email protected] |
92 | [email protected] | 92 | [email protected] |
93 | [email protected] "Fine" | 93 | [email protected] "Fine" |
94 | [email protected] "," | 94 | [email protected] "," |
95 | [email protected] "\n " | 95 | [email protected] "\n " |
96 | [email protected] "}" | 96 | [email protected] "}" |
97 | [email protected] "\n\n " | 97 | [email protected] "\n\n " |
98 | ENUM_DEF@229..300 | 98 | [email protected] |
99 | [email protected] "enum" | 99 | [email protected] "enum" |
100 | [email protected] " " | 100 | [email protected] " " |
101 | [email protected] | 101 | [email protected] |
102 | [email protected] "Test3" | 102 | [email protected] "Test3" |
103 | [email protected] " " | 103 | [email protected] " " |
104 | ENUM_[email protected] | 104 | [email protected] |
105 | [email protected] "{" | 105 | [email protected] "{" |
106 | [email protected] "\n " | 106 | [email protected] "\n " |
107 | ENUM_[email protected] | 107 | [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] ":" |
@@ -132,7 +132,7 @@ [email protected] | |||
132 | [email protected] | 132 | [email protected] |
133 | [email protected] "{" | 133 | [email protected] "{" |
134 | [email protected] "\n " | 134 | [email protected] "\n " |
135 | ENUM_DEF@316..453 | 135 | [email protected] |
136 | [email protected] "// fail again" | 136 | [email protected] "// fail again" |
137 | [email protected] "\n " | 137 | [email protected] "\n " |
138 | [email protected] "enum" | 138 | [email protected] "enum" |
@@ -140,15 +140,15 @@ [email protected] | |||
140 | [email protected] | 140 | [email protected] |
141 | [email protected] "Test4" | 141 | [email protected] "Test4" |
142 | [email protected] " " | 142 | [email protected] " " |
143 | ENUM_[email protected] | 143 | [email protected] |
144 | [email protected] "{" | 144 | [email protected] "{" |
145 | [email protected] "\n " | 145 | [email protected] "\n " |
146 | ENUM_[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/err/0026_imp_recovery.rast b/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.rast index 254ff546a..7e4b11c27 100644 --- a/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.rast +++ b/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.rast | |||
@@ -1,7 +1,7 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..14 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | TYP[email protected] | 4 | GENERIC[email protected] |
5 | [email protected] "<" | 5 | [email protected] "<" |
6 | [email protected] | 6 | [email protected] |
7 | [email protected] | 7 | [email protected] |
@@ -17,9 +17,9 @@ [email protected] | |||
17 | [email protected] "Clone" | 17 | [email protected] "Clone" |
18 | [email protected] ">" | 18 | [email protected] ">" |
19 | [email protected] "\n" | 19 | [email protected] "\n" |
20 | IMPL_DEF@15..37 | 20 | [email protected] |
21 | [email protected] "impl" | 21 | [email protected] "impl" |
22 | TYP[email protected] | 22 | GENERIC[email protected] |
23 | [email protected] "<" | 23 | [email protected] "<" |
24 | [email protected] | 24 | [email protected] |
25 | [email protected] | 25 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast b/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast index 4d6461d1e..a8e42e6ea 100644 --- a/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast +++ b/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..29 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -13,7 +13,7 @@ [email protected] | |||
13 | [email protected] " " | 13 | [email protected] " " |
14 | [email protected] | 14 | [email protected] |
15 | [email protected] "for" | 15 | [email protected] "for" |
16 | TYP[email protected] | 16 | GENERIC[email protected] |
17 | [email protected] "<" | 17 | [email protected] "<" |
18 | [email protected] | 18 | [email protected] |
19 | [email protected] "\'a" | 19 | [email protected] "\'a" |
diff --git a/crates/ra_syntax/test_data/parser/err/0029_field_completion.rast b/crates/ra_syntax/test_data/parser/err/0029_field_completion.rast index 0da8f59f0..bfcd0149e 100644 --- a/crates/ra_syntax/test_data/parser/err/0029_field_completion.rast +++ b/crates/ra_syntax/test_data/parser/err/0029_field_completion.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..23 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rast b/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rast index 515819e42..55ff3943f 100644 --- a/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rast +++ b/crates/ra_syntax/test_data/parser/err/0031_block_inner_attrs.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..349 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast b/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast index c6859eca8..ec9f556aa 100644 --- a/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast +++ b/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..292 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast b/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast index 53e445459..063532e02 100644 --- a/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast +++ b/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..88 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rast b/crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rast index 1b2ac5011..303a49576 100644 --- a/crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rast +++ b/crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..89 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0035_use_recover.rast b/crates/ra_syntax/test_data/parser/err/0035_use_recover.rast index 0415085b0..2f03709eb 100644 --- a/crates/ra_syntax/test_data/parser/err/0035_use_recover.rast +++ b/crates/ra_syntax/test_data/parser/err/0035_use_recover.rast | |||
@@ -34,7 +34,7 @@ [email protected] | |||
34 | [email protected] | 34 | [email protected] |
35 | [email protected] "use" | 35 | [email protected] "use" |
36 | [email protected] "\n" | 36 | [email protected] "\n" |
37 | FN_DEF@38..47 | 37 | [email protected] |
38 | [email protected] "fn" | 38 | [email protected] "fn" |
39 | [email protected] " " | 39 | [email protected] " " |
40 | [email protected] | 40 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast b/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast index bc446e3df..faf87d6e5 100644 --- a/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast +++ b/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..117 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -17,7 +17,7 @@ [email protected] | |||
17 | [email protected] | 17 | [email protected] |
18 | [email protected] "{" | 18 | [email protected] "{" |
19 | [email protected] "\n " | 19 | [email protected] "\n " |
20 | FN_DEF@20..31 | 20 | [email protected] |
21 | [email protected] "fn" | 21 | [email protected] "fn" |
22 | [email protected] " " | 22 | [email protected] " " |
23 | [email protected] | 23 | [email protected] |
@@ -30,7 +30,7 @@ [email protected] | |||
30 | [email protected] "{" | 30 | [email protected] "{" |
31 | [email protected] "}" | 31 | [email protected] "}" |
32 | [email protected] "\n " | 32 | [email protected] "\n " |
33 | FN_DEF@36..51 | 33 | [email protected] |
34 | [email protected] | 34 | [email protected] |
35 | [email protected] "pub" | 35 | [email protected] "pub" |
36 | [email protected] " " | 36 | [email protected] " " |
@@ -46,7 +46,7 @@ [email protected] | |||
46 | [email protected] "{" | 46 | [email protected] "{" |
47 | [email protected] "}" | 47 | [email protected] "}" |
48 | [email protected] "\n " | 48 | [email protected] "\n " |
49 | TYPE_ALIAS_DEF@56..81 | 49 | [email protected] |
50 | [email protected] | 50 | [email protected] |
51 | [email protected] "pub" | 51 | [email protected] "pub" |
52 | [email protected] "(" | 52 | [email protected] "(" |
@@ -65,7 +65,7 @@ [email protected] | |||
65 | [email protected] ")" | 65 | [email protected] ")" |
66 | [email protected] ";" | 66 | [email protected] ";" |
67 | [email protected] "\n " | 67 | [email protected] "\n " |
68 | CONST_DEF@86..115 | 68 | [email protected] |
69 | [email protected] | 69 | [email protected] |
70 | [email protected] "pub" | 70 | [email protected] "pub" |
71 | [email protected] "(" | 71 | [email protected] "(" |
diff --git a/crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rast b/crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rast index 21db9ee85..bed7ad6c3 100644 --- a/crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rast +++ b/crates/ra_syntax/test_data/parser/err/0038_endless_inclusive_range.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..32 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast b/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast index ec950381b..a98c31b0c 100644 --- a/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast +++ b/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..82 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0043_default_const.rast b/crates/ra_syntax/test_data/parser/err/0043_default_const.rast index 6ca1a4870..51ad2a846 100644 --- a/crates/ra_syntax/test_data/parser/err/0043_default_const.rast +++ b/crates/ra_syntax/test_data/parser/err/0043_default_const.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TRAIT_DEF@0..38 | 2 | [email protected] |
3 | [email protected] "trait" | 3 | [email protected] "trait" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -14,7 +14,7 @@ [email protected] | |||
14 | [email protected] | 14 | [email protected] |
15 | [email protected] "default" | 15 | [email protected] "default" |
16 | [email protected] " " | 16 | [email protected] " " |
17 | CONST_DEF@20..36 | 17 | [email protected] |
18 | [email protected] "const" | 18 | [email protected] "const" |
19 | [email protected] " " | 19 | [email protected] " " |
20 | [email protected] | 20 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast b/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast index cb90f28bc..082625c13 100644 --- a/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast +++ b/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..30 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -9,7 +9,7 @@ [email protected] | |||
9 | [email protected] " " | 9 | [email protected] " " |
10 | [email protected] | 10 | [email protected] |
11 | [email protected] "for" | 11 | [email protected] "for" |
12 | TYP[email protected] | 12 | GENERIC[email protected] |
13 | [email protected] "<" | 13 | [email protected] "<" |
14 | [email protected] | 14 | [email protected] |
15 | [email protected] "\'a" | 15 | [email protected] "\'a" |
@@ -26,7 +26,7 @@ [email protected] | |||
26 | [email protected] "u32" | 26 | [email protected] "u32" |
27 | [email protected] ";" | 27 | [email protected] ";" |
28 | [email protected] "\n" | 28 | [email protected] "\n" |
29 | TYPE_ALIAS_DEF@31..64 | 29 | [email protected] |
30 | [email protected] "type" | 30 | [email protected] "type" |
31 | [email protected] " " | 31 | [email protected] " " |
32 | [email protected] | 32 | [email protected] |
@@ -36,7 +36,7 @@ [email protected] | |||
36 | [email protected] " " | 36 | [email protected] " " |
37 | [email protected] | 37 | [email protected] |
38 | [email protected] "for" | 38 | [email protected] "for" |
39 | TYP[email protected] | 39 | GENERIC[email protected] |
40 | [email protected] "<" | 40 | [email protected] "<" |
41 | [email protected] | 41 | [email protected] |
42 | [email protected] "\'a" | 42 | [email protected] "\'a" |
@@ -57,7 +57,7 @@ [email protected] | |||
57 | [email protected] ")" | 57 | [email protected] ")" |
58 | [email protected] ";" | 58 | [email protected] ";" |
59 | [email protected] "\n" | 59 | [email protected] "\n" |
60 | TYPE_ALIAS_DEF@65..95 | 60 | [email protected] |
61 | [email protected] "type" | 61 | [email protected] "type" |
62 | [email protected] " " | 62 | [email protected] " " |
63 | [email protected] | 63 | [email protected] |
@@ -67,7 +67,7 @@ [email protected] | |||
67 | [email protected] " " | 67 | [email protected] " " |
68 | [email protected] | 68 | [email protected] |
69 | [email protected] "for" | 69 | [email protected] "for" |
70 | TYP[email protected] | 70 | GENERIC[email protected] |
71 | [email protected] "<" | 71 | [email protected] "<" |
72 | [email protected] | 72 | [email protected] |
73 | [email protected] "\'a" | 73 | [email protected] "\'a" |
@@ -83,7 +83,7 @@ [email protected] | |||
83 | [email protected] "]" | 83 | [email protected] "]" |
84 | [email protected] ";" | 84 | [email protected] ";" |
85 | [email protected] "\n" | 85 | [email protected] "\n" |
86 | TYPE_ALIAS_DEF@96..149 | 86 | [email protected] |
87 | [email protected] "type" | 87 | [email protected] "type" |
88 | [email protected] " " | 88 | [email protected] " " |
89 | [email protected] | 89 | [email protected] |
@@ -93,7 +93,7 @@ [email protected] | |||
93 | [email protected] " " | 93 | [email protected] " " |
94 | [email protected] | 94 | [email protected] |
95 | [email protected] "for" | 95 | [email protected] "for" |
96 | TYP[email protected] | 96 | GENERIC[email protected] |
97 | [email protected] "<" | 97 | [email protected] "<" |
98 | [email protected] | 98 | [email protected] |
99 | [email protected] "\'a" | 99 | [email protected] "\'a" |
@@ -101,7 +101,7 @@ [email protected] | |||
101 | [email protected] " " | 101 | [email protected] " " |
102 | [email protected] | 102 | [email protected] |
103 | [email protected] "for" | 103 | [email protected] "for" |
104 | TYP[email protected] | 104 | GENERIC[email protected] |
105 | [email protected] "<" | 105 | [email protected] "<" |
106 | [email protected] | 106 | [email protected] |
107 | [email protected] "\'b" | 107 | [email protected] "\'b" |
@@ -136,12 +136,12 @@ [email protected] | |||
136 | [email protected] ")" | 136 | [email protected] ")" |
137 | [email protected] ";" | 137 | [email protected] ";" |
138 | [email protected] "\n" | 138 | [email protected] "\n" |
139 | FN_DEF@150..238 | 139 | [email protected] |
140 | [email protected] "fn" | 140 | [email protected] "fn" |
141 | [email protected] " " | 141 | [email protected] " " |
142 | [email protected] | 142 | [email protected] |
143 | [email protected] "for_for_for" | 143 | [email protected] "for_for_for" |
144 | TYP[email protected] | 144 | GENERIC[email protected] |
145 | [email protected] "<" | 145 | [email protected] "<" |
146 | [email protected] | 146 | [email protected] |
147 | [email protected] | 147 | [email protected] |
@@ -156,7 +156,7 @@ [email protected] | |||
156 | [email protected] "\n " | 156 | [email protected] "\n " |
157 | [email protected] | 157 | [email protected] |
158 | [email protected] "for" | 158 | [email protected] "for" |
159 | TYP[email protected] | 159 | GENERIC[email protected] |
160 | [email protected] "<" | 160 | [email protected] "<" |
161 | [email protected] | 161 | [email protected] |
162 | [email protected] "\'a" | 162 | [email protected] "\'a" |
@@ -164,7 +164,7 @@ [email protected] | |||
164 | [email protected] " " | 164 | [email protected] " " |
165 | [email protected] | 165 | [email protected] |
166 | [email protected] "for" | 166 | [email protected] "for" |
167 | TYP[email protected] | 167 | GENERIC[email protected] |
168 | [email protected] "<" | 168 | [email protected] "<" |
169 | [email protected] | 169 | [email protected] |
170 | [email protected] "\'b" | 170 | [email protected] "\'b" |
@@ -172,7 +172,7 @@ [email protected] | |||
172 | [email protected] " " | 172 | [email protected] " " |
173 | [email protected] | 173 | [email protected] |
174 | [email protected] "for" | 174 | [email protected] "for" |
175 | TYP[email protected] | 175 | GENERIC[email protected] |
176 | [email protected] "<" | 176 | [email protected] "<" |
177 | [email protected] | 177 | [email protected] |
178 | [email protected] "\'c" | 178 | [email protected] "\'c" |
diff --git a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast b/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast index e46456384..df29017e7 100644 --- a/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast +++ b/crates/ra_syntax/test_data/parser/err/0163_weird_blocks.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..82 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast b/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast index f1e78f388..93c429e12 100644 --- a/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast +++ b/crates/ra_syntax/test_data/parser/fragments/item/ok/0000_fn.rast | |||
@@ -1,4 +1,4 @@ | |||
1 | FN_DEF@0..11 | 1 | [email protected] |
2 | [email protected] "fn" | 2 | [email protected] "fn" |
3 | [email protected] " " | 3 | [email protected] " " |
4 | [email protected] | 4 | [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/err/0001_array_type_missing_semi.rast b/crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rast index bf70ebca4..0b9bbec07 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..12 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast index 75668c818..a4271fc87 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..29 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -17,7 +17,7 @@ [email protected] | |||
17 | [email protected] "\'loop" | 17 | [email protected] "\'loop" |
18 | [email protected] ":" | 18 | [email protected] ":" |
19 | [email protected] " " | 19 | [email protected] " " |
20 | IMPL_DEF@23..27 | 20 | [email protected] |
21 | [email protected] "impl" | 21 | [email protected] "impl" |
22 | [email protected] "\n" | 22 | [email protected] "\n" |
23 | [email protected] "}" | 23 | [email protected] "}" |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast b/crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast index 95bcc3c0a..2409eefe7 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..13 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.rast b/crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.rast index 2d0253aa0..29d6b3974 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..12 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -12,7 +12,7 @@ [email protected] | |||
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "}" | 13 | [email protected] "}" |
14 | [email protected] "\n" | 14 | [email protected] "\n" |
15 | IMPL_DEF@13..33 | 15 | [email protected] |
16 | [email protected] "impl" | 16 | [email protected] "impl" |
17 | [email protected] " " | 17 | [email protected] " " |
18 | [email protected] | 18 | [email protected] |
@@ -33,10 +33,10 @@ [email protected] | |||
33 | [email protected] "{" | 33 | [email protected] "{" |
34 | [email protected] "}" | 34 | [email protected] "}" |
35 | [email protected] "\n" | 35 | [email protected] "\n" |
36 | IMPL_DEF@34..38 | 36 | [email protected] |
37 | [email protected] "impl" | 37 | [email protected] "impl" |
38 | [email protected] " " | 38 | [email protected] " " |
39 | IMPL_DEF@39..54 | 39 | [email protected] |
40 | [email protected] "impl" | 40 | [email protected] "impl" |
41 | [email protected] " " | 41 | [email protected] " " |
42 | [email protected] | 42 | [email protected] |
@@ -49,7 +49,7 @@ [email protected] | |||
49 | [email protected] "{" | 49 | [email protected] "{" |
50 | [email protected] "}" | 50 | [email protected] "}" |
51 | [email protected] "\n" | 51 | [email protected] "\n" |
52 | IMPL_DEF@55..70 | 52 | [email protected] |
53 | [email protected] "impl" | 53 | [email protected] "impl" |
54 | [email protected] " " | 54 | [email protected] " " |
55 | [email protected] | 55 | [email protected] |
@@ -60,7 +60,7 @@ [email protected] | |||
60 | [email protected] " " | 60 | [email protected] " " |
61 | [email protected] "for" | 61 | [email protected] "for" |
62 | [email protected] " " | 62 | [email protected] " " |
63 | IMPL_DEF@71..86 | 63 | [email protected] |
64 | [email protected] "impl" | 64 | [email protected] "impl" |
65 | [email protected] " " | 65 | [email protected] " " |
66 | [email protected] | 66 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast b/crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast index 90202d764..776022fd9 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..15 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast b/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast index c789e8d82..cc0f8bcaf 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..10 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -19,7 +19,7 @@ [email protected] | |||
19 | [email protected] " " | 19 | [email protected] " " |
20 | [email protected] "}" | 20 | [email protected] "}" |
21 | [email protected] " " | 21 | [email protected] " " |
22 | FN_DEF@22..32 | 22 | [email protected] |
23 | [email protected] "fn" | 23 | [email protected] "fn" |
24 | [email protected] " " | 24 | [email protected] " " |
25 | [email protected] | 25 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast b/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast index cd24313d4..3f3a7f1b9 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..29 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast b/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast index c5fa7a404..63a10127d 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..20 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast index 4e3fa704e..8fd8d5e59 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..47 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast b/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast index e1abc5633..fa14e1e6d 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..46 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast index 53f7ebaf9..a6e6552a9 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.rast | |||
@@ -2,7 +2,7 @@ [email protected] | |||
2 | [email protected] | 2 | [email protected] |
3 | [email protected] "unsafe" | 3 | [email protected] "unsafe" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | FN_DEF@7..24 | 5 | [email protected] |
6 | [email protected] "async" | 6 | [email protected] "async" |
7 | [email protected] " " | 7 | [email protected] " " |
8 | [email protected] "fn" | 8 | [email protected] "fn" |
@@ -17,7 +17,7 @@ [email protected] | |||
17 | [email protected] "{" | 17 | [email protected] "{" |
18 | [email protected] "}" | 18 | [email protected] "}" |
19 | [email protected] "\n" | 19 | [email protected] "\n" |
20 | CONST_DEF@25..46 | 20 | [email protected] |
21 | [email protected] "unsafe" | 21 | [email protected] "unsafe" |
22 | [email protected] " " | 22 | [email protected] " " |
23 | [email protected] "const" | 23 | [email protected] "const" |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.rast b/crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.rast index ebcc26e0d..8d761b907 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0013_static_underscore.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STATIC_DEF@0..18 | 2 | [email protected] |
3 | [email protected] "static" | 3 | [email protected] "static" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast index 5501dc5a6..acd72094b 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TRAIT_DEF@0..61 | 2 | [email protected] |
3 | [email protected] "trait" | 3 | [email protected] "trait" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -14,7 +14,7 @@ [email protected] | |||
14 | [email protected] | 14 | [email protected] |
15 | [email protected] "default" | 15 | [email protected] "default" |
16 | [email protected] " " | 16 | [email protected] " " |
17 | TYPE_ALIAS_DEF@22..35 | 17 | [email protected] |
18 | [email protected] "type" | 18 | [email protected] "type" |
19 | [email protected] " " | 19 | [email protected] " " |
20 | [email protected] | 20 | [email protected] |
@@ -35,7 +35,7 @@ [email protected] | |||
35 | [email protected] | 35 | [email protected] |
36 | [email protected] "default" | 36 | [email protected] "default" |
37 | [email protected] " " | 37 | [email protected] " " |
38 | FN_DEF@48..59 | 38 | [email protected] |
39 | [email protected] "fn" | 39 | [email protected] "fn" |
40 | [email protected] " " | 40 | [email protected] " " |
41 | [email protected] | 41 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast b/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast index a9de44b57..a81c442c0 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast +++ b/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..44 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -11,16 +11,16 @@ [email protected] | |||
11 | [email protected] | 11 | [email protected] |
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "\n " | 13 | [email protected] "\n " |
14 | RECORD_LIT@16..42 | 14 | RECORD_EXPR@16..42 |
15 | [email protected] | 15 | [email protected] |
16 | [email protected] | 16 | [email protected] |
17 | [email protected] | 17 | [email protected] |
18 | [email protected] "S" | 18 | [email protected] "S" |
19 | [email protected] " " | 19 | [email protected] " " |
20 | [email protected] | 20 | RECORD_EXPR_[email protected] |
21 | [email protected] "{" | 21 | [email protected] "{" |
22 | [email protected] " " | 22 | [email protected] " " |
23 | [email protected] | 23 | RECORD_EXPR_[email protected] |
24 | [email protected] | 24 | [email protected] |
25 | [email protected] "field" | 25 | [email protected] "field" |
26 | [email protected] " " | 26 | [email protected] " " |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast b/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast index f422acdda..c7289e400 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..82 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -11,7 +11,7 @@ [email protected] | |||
11 | [email protected] | 11 | [email protected] |
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "\n " | 13 | [email protected] "\n " |
14 | TYPE_ALIAS_DEF@13..27 | 14 | [email protected] |
15 | [email protected] "type" | 15 | [email protected] "type" |
16 | [email protected] " " | 16 | [email protected] " " |
17 | [email protected] | 17 | [email protected] |
@@ -27,7 +27,7 @@ [email protected] | |||
27 | [email protected] "Clone" | 27 | [email protected] "Clone" |
28 | [email protected] ";" | 28 | [email protected] ";" |
29 | [email protected] "\n " | 29 | [email protected] "\n " |
30 | CONST_DEF@32..45 | 30 | [email protected] |
31 | [email protected] "const" | 31 | [email protected] "const" |
32 | [email protected] " " | 32 | [email protected] " " |
33 | [email protected] | 33 | [email protected] |
@@ -41,7 +41,7 @@ [email protected] | |||
41 | [email protected] "i32" | 41 | [email protected] "i32" |
42 | [email protected] ";" | 42 | [email protected] ";" |
43 | [email protected] "\n " | 43 | [email protected] "\n " |
44 | FN_DEF@50..61 | 44 | [email protected] |
45 | [email protected] "fn" | 45 | [email protected] "fn" |
46 | [email protected] " " | 46 | [email protected] " " |
47 | [email protected] | 47 | [email protected] |
@@ -54,7 +54,7 @@ [email protected] | |||
54 | [email protected] "{" | 54 | [email protected] "{" |
55 | [email protected] "}" | 55 | [email protected] "}" |
56 | [email protected] "\n " | 56 | [email protected] "\n " |
57 | FN_DEF@66..80 | 57 | [email protected] |
58 | [email protected] "fn" | 58 | [email protected] "fn" |
59 | [email protected] " " | 59 | [email protected] " " |
60 | [email protected] | 60 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast index cd0892451..b0f2b5888 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0003_where_pred_for.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..53 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "for_trait" | 6 | [email protected] "for_trait" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
@@ -19,7 +19,7 @@ [email protected] | |||
19 | [email protected] "\n " | 19 | [email protected] "\n " |
20 | [email protected] | 20 | [email protected] |
21 | [email protected] "for" | 21 | [email protected] "for" |
22 | TYP[email protected] | 22 | GENERIC[email protected] |
23 | [email protected] "<" | 23 | [email protected] "<" |
24 | [email protected] | 24 | [email protected] |
25 | [email protected] "\'a" | 25 | [email protected] "\'a" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast b/crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast index 20eba09f5..ace8ad050 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..38 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rast b/crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rast index 6c8c1e24b..8e0252ce7 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0005_function_type_params.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..27 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "foo" | 6 | [email protected] "foo" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rast b/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rast index 0cd1dffc9..ae61cbad8 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..127 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -11,7 +11,7 @@ [email protected] | |||
11 | [email protected] | 11 | [email protected] |
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "\n " | 13 | [email protected] "\n " |
14 | FN_DEF@13..26 | 14 | [email protected] |
15 | [email protected] "fn" | 15 | [email protected] "fn" |
16 | [email protected] " " | 16 | [email protected] " " |
17 | [email protected] | 17 | [email protected] |
@@ -26,7 +26,7 @@ [email protected] | |||
26 | [email protected] "{" | 26 | [email protected] "{" |
27 | [email protected] "}" | 27 | [email protected] "}" |
28 | [email protected] "\n " | 28 | [email protected] "\n " |
29 | FN_DEF@31..46 | 29 | [email protected] |
30 | [email protected] "fn" | 30 | [email protected] "fn" |
31 | [email protected] " " | 31 | [email protected] " " |
32 | [email protected] | 32 | [email protected] |
@@ -43,7 +43,7 @@ [email protected] | |||
43 | [email protected] "{" | 43 | [email protected] "{" |
44 | [email protected] "}" | 44 | [email protected] "}" |
45 | [email protected] "\n " | 45 | [email protected] "\n " |
46 | FN_DEF@51..69 | 46 | [email protected] |
47 | [email protected] "fn" | 47 | [email protected] "fn" |
48 | [email protected] " " | 48 | [email protected] " " |
49 | [email protected] | 49 | [email protected] |
@@ -62,7 +62,7 @@ [email protected] | |||
62 | [email protected] "{" | 62 | [email protected] "{" |
63 | [email protected] "}" | 63 | [email protected] "}" |
64 | [email protected] "\n " | 64 | [email protected] "\n " |
65 | FN_DEF@74..103 | 65 | [email protected] |
66 | [email protected] "fn" | 66 | [email protected] "fn" |
67 | [email protected] " " | 67 | [email protected] " " |
68 | [email protected] | 68 | [email protected] |
@@ -95,7 +95,7 @@ [email protected] | |||
95 | [email protected] "{" | 95 | [email protected] "{" |
96 | [email protected] "}" | 96 | [email protected] "}" |
97 | [email protected] "\n " | 97 | [email protected] "\n " |
98 | FN_DEF@108..125 | 98 | [email protected] |
99 | [email protected] "fn" | 99 | [email protected] "fn" |
100 | [email protected] " " | 100 | [email protected] " " |
101 | [email protected] | 101 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast b/crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast index 7cb9e1d55..e95688f56 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..34 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S" | 6 | [email protected] "S" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rast b/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rast index 10eb31d68..3ce2acfae 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0008_path_part.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..102 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rast index 425e5196c..f62826fd5 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0009_loop_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..25 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rast index d823c08fc..66a609346 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0011_field_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..47 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast b/crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast index 283442a8b..28c94bfd6 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..30 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast b/crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast index e2e871dda..845b32e6d 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..17 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -16,7 +16,7 @@ [email protected] | |||
16 | [email protected] ")" | 16 | [email protected] ")" |
17 | [email protected] ";" | 17 | [email protected] ";" |
18 | [email protected] "\n" | 18 | [email protected] "\n" |
19 | TYPE_ALIAS_DEF@18..35 | 19 | [email protected] |
20 | [email protected] "type" | 20 | [email protected] "type" |
21 | [email protected] " " | 21 | [email protected] " " |
22 | [email protected] | 22 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rast index a60940fcf..b1d5106ce 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..15 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rast index 422912e3c..104e153ce 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0015_continue_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..68 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rast b/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rast index 69b82e33c..625ab4c2d 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0016_unsafe_trait.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TRAIT_DEF@0..17 | 2 | [email protected] |
3 | [email protected] "unsafe" | 3 | [email protected] "unsafe" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "trait" | 5 | [email protected] "trait" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rast index 61a0b22f4..c131df1c9 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..18 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rast b/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rast index 79148e953..20b2b6c19 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..68 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -11,7 +11,7 @@ [email protected] | |||
11 | [email protected] | 11 | [email protected] |
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "\n " | 13 | [email protected] "\n " |
14 | FN_DEF@13..33 | 14 | [email protected] |
15 | [email protected] "fn" | 15 | [email protected] "fn" |
16 | [email protected] " " | 16 | [email protected] " " |
17 | [email protected] | 17 | [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 | FN_DEF@38..66 | 38 | [email protected] |
39 | [email protected] "fn" | 39 | [email protected] "fn" |
40 | [email protected] " " | 40 | [email protected] " " |
41 | [email protected] | 41 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rast index 10d6b2fde..7db38ea4d 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0019_unary_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..43 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast b/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast index 31b5b6616..ca0702aba 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..88 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -11,7 +11,7 @@ [email protected] | |||
11 | [email protected] | 11 | [email protected] |
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "\n " | 13 | [email protected] "\n " |
14 | TYPE_ALIAS_DEF@13..26 | 14 | [email protected] |
15 | [email protected] "type" | 15 | [email protected] "type" |
16 | [email protected] " " | 16 | [email protected] " " |
17 | [email protected] | 17 | [email protected] |
@@ -26,7 +26,7 @@ [email protected] | |||
26 | [email protected] "i32" | 26 | [email protected] "i32" |
27 | [email protected] ";" | 27 | [email protected] ";" |
28 | [email protected] "\n " | 28 | [email protected] "\n " |
29 | CONST_DEF@31..49 | 29 | [email protected] |
30 | [email protected] "const" | 30 | [email protected] "const" |
31 | [email protected] " " | 31 | [email protected] " " |
32 | [email protected] | 32 | [email protected] |
@@ -45,7 +45,7 @@ [email protected] | |||
45 | [email protected] "92" | 45 | [email protected] "92" |
46 | [email protected] ";" | 46 | [email protected] ";" |
47 | [email protected] "\n " | 47 | [email protected] "\n " |
48 | FN_DEF@54..65 | 48 | [email protected] |
49 | [email protected] "fn" | 49 | [email protected] "fn" |
50 | [email protected] " " | 50 | [email protected] " " |
51 | [email protected] | 51 | [email protected] |
@@ -58,7 +58,7 @@ [email protected] | |||
58 | [email protected] "{" | 58 | [email protected] "{" |
59 | [email protected] "}" | 59 | [email protected] "}" |
60 | [email protected] "\n " | 60 | [email protected] "\n " |
61 | FN_DEF@70..86 | 61 | [email protected] |
62 | [email protected] "fn" | 62 | [email protected] "fn" |
63 | [email protected] " " | 63 | [email protected] " " |
64 | [email protected] | 64 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rast b/crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rast index 1b810607e..50742cbcf 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..20 | 2 | [email protected] |
3 | [email protected] | 3 | [email protected] |
4 | [email protected] "pub" | 4 | [email protected] "pub" |
5 | [email protected] "(" | 5 | [email protected] "(" |
@@ -12,7 +12,7 @@ [email protected] | |||
12 | [email protected] "S" | 12 | [email protected] "S" |
13 | [email protected] ";" | 13 | [email protected] ";" |
14 | [email protected] "\n" | 14 | [email protected] "\n" |
15 | STRUCT_DEF@21..40 | 15 | [email protected] |
16 | [email protected] | 16 | [email protected] |
17 | [email protected] "pub" | 17 | [email protected] "pub" |
18 | [email protected] "(" | 18 | [email protected] "(" |
@@ -25,7 +25,7 @@ [email protected] | |||
25 | [email protected] "S" | 25 | [email protected] "S" |
26 | [email protected] ";" | 26 | [email protected] ";" |
27 | [email protected] "\n" | 27 | [email protected] "\n" |
28 | STRUCT_DEF@41..60 | 28 | [email protected] |
29 | [email protected] | 29 | [email protected] |
30 | [email protected] "pub" | 30 | [email protected] "pub" |
31 | [email protected] "(" | 31 | [email protected] "(" |
@@ -38,7 +38,7 @@ [email protected] | |||
38 | [email protected] "S" | 38 | [email protected] "S" |
39 | [email protected] ";" | 39 | [email protected] ";" |
40 | [email protected] "\n" | 40 | [email protected] "\n" |
41 | STRUCT_DEF@61..80 | 41 | [email protected] |
42 | [email protected] | 42 | [email protected] |
43 | [email protected] "pub" | 43 | [email protected] "pub" |
44 | [email protected] "(" | 44 | [email protected] "(" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast index 17687617b..57008e5fe 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..21 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rast index 7eb27d5e1..dea0c73f7 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0024_slice_pat.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..38 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rast index 0a6d77f45..fd819ea37 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..14 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast b/crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast index b4598768e..e5f550347 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0026_tuple_pat_fields.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..96 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rast index b824c10a8..9e76d881e 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0027_ref_pat.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..51 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast index 93f5c738c..f45f3cab8 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..42 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rast index fabb09937..e096b3a1f 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0029_cast_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..88 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rast b/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rast index 3aed26732..381284dc5 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..37 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -41,7 +41,7 @@ [email protected] | |||
41 | [email protected] " " | 41 | [email protected] " " |
42 | [email protected] "}" | 42 | [email protected] "}" |
43 | [email protected] "\n" | 43 | [email protected] "\n" |
44 | FN_DEF@38..196 | 44 | [email protected] |
45 | [email protected] "fn" | 45 | [email protected] "fn" |
46 | [email protected] " " | 46 | [email protected] " " |
47 | [email protected] | 47 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rast index 899b63aac..ffe1a3a01 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0031_while_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..92 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast index 72705e148..79a5ee339 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..14 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -14,7 +14,7 @@ [email protected] | |||
14 | [email protected] ")" | 14 | [email protected] ")" |
15 | [email protected] ";" | 15 | [email protected] ";" |
16 | [email protected] "\n" | 16 | [email protected] "\n" |
17 | TYPE_ALIAS_DEF@15..36 | 17 | [email protected] |
18 | [email protected] "type" | 18 | [email protected] "type" |
19 | [email protected] " " | 19 | [email protected] " " |
20 | [email protected] | 20 | [email protected] |
@@ -31,7 +31,7 @@ [email protected] | |||
31 | [email protected] ")" | 31 | [email protected] ")" |
32 | [email protected] ";" | 32 | [email protected] ";" |
33 | [email protected] "\n" | 33 | [email protected] "\n" |
34 | TYPE_ALIAS_DEF@37..69 | 34 | [email protected] |
35 | [email protected] "type" | 35 | [email protected] "type" |
36 | [email protected] " " | 36 | [email protected] " " |
37 | [email protected] | 37 | [email protected] |
@@ -53,7 +53,7 @@ [email protected] | |||
53 | [email protected] ")" | 53 | [email protected] ")" |
54 | [email protected] ";" | 54 | [email protected] ";" |
55 | [email protected] "\n" | 55 | [email protected] "\n" |
56 | TYPE_ALIAS_DEF@70..112 | 56 | [email protected] |
57 | [email protected] "type" | 57 | [email protected] "type" |
58 | [email protected] " " | 58 | [email protected] " " |
59 | [email protected] | 59 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rast b/crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rast index 784fbb592..c522f76cf 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..13 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -14,7 +14,7 @@ [email protected] | |||
14 | [email protected] ")" | 14 | [email protected] ")" |
15 | [email protected] ";" | 15 | [email protected] ";" |
16 | [email protected] "\n" | 16 | [email protected] "\n" |
17 | TYPE_ALIAS_DEF@14..35 | 17 | [email protected] |
18 | [email protected] "type" | 18 | [email protected] "type" |
19 | [email protected] " " | 19 | [email protected] " " |
20 | [email protected] | 20 | [email protected] |
@@ -31,7 +31,7 @@ [email protected] | |||
31 | [email protected] ")" | 31 | [email protected] ")" |
32 | [email protected] ";" | 32 | [email protected] ";" |
33 | [email protected] "\n" | 33 | [email protected] "\n" |
34 | TYPE_ALIAS_DEF@36..53 | 34 | [email protected] |
35 | [email protected] "type" | 35 | [email protected] "type" |
36 | [email protected] " " | 36 | [email protected] " " |
37 | [email protected] | 37 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rast index e064aafaf..f905def6f 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0034_break_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..101 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast index cf5825593..293b1d64c 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0036_unsafe_extern_fn.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..29 | 2 | [email protected] |
3 | [email protected] "unsafe" | 3 | [email protected] "unsafe" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast b/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast index fbd90bc0f..b6379e62f 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..26 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -32,7 +32,7 @@ [email protected] | |||
32 | [email protected] "Output" | 32 | [email protected] "Output" |
33 | [email protected] ";" | 33 | [email protected] ";" |
34 | [email protected] "\n" | 34 | [email protected] "\n" |
35 | FN_DEF@27..70 | 35 | [email protected] |
36 | [email protected] "fn" | 36 | [email protected] "fn" |
37 | [email protected] " " | 37 | [email protected] " " |
38 | [email protected] | 38 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rast index a767f145d..64e705fb3 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0038_full_range_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..20 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rast b/crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rast index e92ea2bf2..2185d3c91 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..45 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
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 aa582516a..db5bd2849 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 | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..19 | 2 | [email protected] |
3 | [email protected] | 3 | [email protected] |
4 | [email protected] "crate" | 4 | [email protected] "crate" |
5 | [email protected] " " | 5 | [email protected] " " |
@@ -16,16 +16,16 @@ [email protected] | |||
16 | [email protected] " " | 16 | [email protected] " " |
17 | [email protected] "}" | 17 | [email protected] "}" |
18 | [email protected] "\n" | 18 | [email protected] "\n" |
19 | STRUCT_DEF@20..49 | 19 | [email protected] |
20 | [email protected] "struct" | 20 | [email protected] "struct" |
21 | [email protected] " " | 21 | [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] " " |
@@ -41,14 +41,14 @@ [email protected] | |||
41 | [email protected] " " | 41 | [email protected] " " |
42 | [email protected] "}" | 42 | [email protected] "}" |
43 | [email protected] "\n" | 43 | [email protected] "\n" |
44 | STRUCT_DEF@50..70 | 44 | [email protected] |
45 | [email protected] "struct" | 45 | [email protected] "struct" |
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/0041_trait_item.rast b/crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.rast index 884ab2dbf..3638462f8 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0041_trait_item.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TRAIT_DEF@0..41 | 2 | [email protected] |
3 | [email protected] "trait" | 3 | [email protected] "trait" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "T" | 6 | [email protected] "T" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
@@ -52,12 +52,12 @@ [email protected] | |||
52 | [email protected] "{" | 52 | [email protected] "{" |
53 | [email protected] "}" | 53 | [email protected] "}" |
54 | [email protected] "\n" | 54 | [email protected] "\n" |
55 | TRAIT_DEF@42..100 | 55 | [email protected] |
56 | [email protected] "trait" | 56 | [email protected] "trait" |
57 | [email protected] " " | 57 | [email protected] " " |
58 | [email protected] | 58 | [email protected] |
59 | [email protected] "X" | 59 | [email protected] "X" |
60 | TYP[email protected] | 60 | GENERIC[email protected] |
61 | [email protected] "<" | 61 | [email protected] "<" |
62 | [email protected] | 62 | [email protected] |
63 | [email protected] | 63 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rast index 0c1c6e877..40875ae1e 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0042_call_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..117 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rast b/crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rast index c23b3b67c..1fd3cd0e7 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0044_block_items.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..20 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -11,7 +11,7 @@ [email protected] | |||
11 | [email protected] | 11 | [email protected] |
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] " " | 13 | [email protected] " " |
14 | FN_DEF@9..18 | 14 | [email protected] |
15 | [email protected] "fn" | 15 | [email protected] "fn" |
16 | [email protected] " " | 16 | [email protected] " " |
17 | [email protected] | 17 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast b/crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast index 9ca2165ba..d4235a8b1 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..34 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "foo" | 6 | [email protected] "foo" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast index c28dc9d61..e89284c14 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..16 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rast index 8a6b5a8fc..d6dfa83b7 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..26 | 2 | [email protected] |
3 | [email protected] "unsafe" | 3 | [email protected] "unsafe" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "default" | 5 | [email protected] "default" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast b/crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast index b209f67f8..37757ccd4 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..26 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -38,7 +38,7 @@ [email protected] | |||
38 | [email protected] "{" | 38 | [email protected] "{" |
39 | [email protected] "}" | 39 | [email protected] "}" |
40 | [email protected] "\n" | 40 | [email protected] "\n" |
41 | FN_DEF@27..57 | 41 | [email protected] |
42 | [email protected] "fn" | 42 | [email protected] "fn" |
43 | [email protected] " " | 43 | [email protected] " " |
44 | [email protected] | 44 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rast index 5f1429102..a5bf55131 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0050_fn_decl.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TRAIT_DEF@0..21 | 2 | [email protected] |
3 | [email protected] "trait" | 3 | [email protected] "trait" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -8,7 +8,7 @@ [email protected] | |||
8 | [email protected] | 8 | [email protected] |
9 | [email protected] "{" | 9 | [email protected] "{" |
10 | [email protected] " " | 10 | [email protected] " " |
11 | FN_DEF@10..19 | 11 | [email protected] |
12 | [email protected] "fn" | 12 | [email protected] "fn" |
13 | [email protected] " " | 13 | [email protected] " " |
14 | [email protected] | 14 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rast index 798ef2a48..6330dbf9e 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..12 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rast index 0d2f5ff56..9bc36bea7 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..13 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -14,7 +14,7 @@ [email protected] | |||
14 | [email protected] "Foo" | 14 | [email protected] "Foo" |
15 | [email protected] ";" | 15 | [email protected] ";" |
16 | [email protected] "\n" | 16 | [email protected] "\n" |
17 | TYPE_ALIAS_DEF@14..29 | 17 | [email protected] |
18 | [email protected] "type" | 18 | [email protected] "type" |
19 | [email protected] " " | 19 | [email protected] " " |
20 | [email protected] | 20 | [email protected] |
@@ -30,7 +30,7 @@ [email protected] | |||
30 | [email protected] "Foo" | 30 | [email protected] "Foo" |
31 | [email protected] ";" | 31 | [email protected] ";" |
32 | [email protected] "\n" | 32 | [email protected] "\n" |
33 | TYPE_ALIAS_DEF@30..49 | 33 | [email protected] |
34 | [email protected] "type" | 34 | [email protected] "type" |
35 | [email protected] " " | 35 | [email protected] " " |
36 | [email protected] | 36 | [email protected] |
@@ -49,7 +49,7 @@ [email protected] | |||
49 | [email protected] "Foo" | 49 | [email protected] "Foo" |
50 | [email protected] ";" | 50 | [email protected] ";" |
51 | [email protected] "\n" | 51 | [email protected] "\n" |
52 | TYPE_ALIAS_DEF@50..70 | 52 | [email protected] |
53 | [email protected] "type" | 53 | [email protected] "type" |
54 | [email protected] " " | 54 | [email protected] " " |
55 | [email protected] | 55 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rast index 70232a3b2..2bfb52453 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0053_path_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..90 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [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..9ae271817 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 | |||
@@ -1,14 +1,14 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..63 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [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/0055_literal_pattern.rast b/crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rast index 03c52525e..68bb43852 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0055_literal_pattern.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..112 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rast b/crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rast index 24f89b83f..28129c50c 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0056_where_clause.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..115 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast index bb43d1eaf..97548a5ee 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0057_const_fn.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..17 | 2 | [email protected] |
3 | [email protected] "const" | 3 | [email protected] "const" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "fn" | 5 | [email protected] "fn" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rast index 8bd94a868..3e72f9671 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0058_range_pat.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..111 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast b/crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast index 9210f155c..fa659c19b 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0059_match_arms_commas.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..82 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast b/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast index 850465d82..a9ae1aa59 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..111 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -12,28 +12,28 @@ [email protected] | |||
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "\n " | 13 | [email protected] "\n " |
14 | [email protected] | 14 | [email protected] |
15 | RECORD_LIT@15..19 | 15 | RECORD_EXPR@15..19 |
16 | [email protected] | 16 | [email protected] |
17 | [email protected] | 17 | [email protected] |
18 | [email protected] | 18 | [email protected] |
19 | [email protected] "S" | 19 | [email protected] "S" |
20 | [email protected] " " | 20 | [email protected] " " |
21 | [email protected] | 21 | RECORD_EXPR_[email protected] |
22 | [email protected] "{" | 22 | [email protected] "{" |
23 | [email protected] "}" | 23 | [email protected] "}" |
24 | [email protected] ";" | 24 | [email protected] ";" |
25 | [email protected] "\n " | 25 | [email protected] "\n " |
26 | [email protected] | 26 | [email protected] |
27 | RECORD_LIT@25..40 | 27 | RECORD_EXPR@25..40 |
28 | [email protected] | 28 | [email protected] |
29 | [email protected] | 29 | [email protected] |
30 | [email protected] | 30 | [email protected] |
31 | [email protected] "S" | 31 | [email protected] "S" |
32 | [email protected] " " | 32 | [email protected] " " |
33 | [email protected] | 33 | RECORD_EXPR_[email protected] |
34 | [email protected] "{" | 34 | [email protected] "{" |
35 | [email protected] " " | 35 | [email protected] " " |
36 | [email protected] | 36 | RECORD_EXPR_[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] "x" | 41 | [email protected] "x" |
42 | [email protected] "," | 42 | [email protected] "," |
43 | [email protected] " " | 43 | [email protected] " " |
44 | [email protected] | 44 | RECORD_EXPR_[email protected] |
45 | [email protected] | 45 | [email protected] |
46 | [email protected] "y" | 46 | [email protected] "y" |
47 | [email protected] ":" | 47 | [email protected] ":" |
@@ -54,16 +54,16 @@ [email protected] | |||
54 | [email protected] ";" | 54 | [email protected] ";" |
55 | [email protected] "\n " | 55 | [email protected] "\n " |
56 | [email protected] | 56 | [email protected] |
57 | RECORD_LIT@46..82 | 57 | RECORD_EXPR@46..82 |
58 | [email protected] | 58 | [email protected] |
59 | [email protected] | 59 | [email protected] |
60 | [email protected] | 60 | [email protected] |
61 | [email protected] "S" | 61 | [email protected] "S" |
62 | [email protected] " " | 62 | [email protected] " " |
63 | [email protected] | 63 | RECORD_EXPR_[email protected] |
64 | [email protected] "{" | 64 | [email protected] "{" |
65 | [email protected] " " | 65 | [email protected] " " |
66 | [email protected] | 66 | RECORD_EXPR_[email protected] |
67 | [email protected] | 67 | [email protected] |
68 | [email protected] | 68 | [email protected] |
69 | [email protected] | 69 | [email protected] |
@@ -71,7 +71,7 @@ [email protected] | |||
71 | [email protected] "x" | 71 | [email protected] "x" |
72 | [email protected] "," | 72 | [email protected] "," |
73 | [email protected] " " | 73 | [email protected] " " |
74 | [email protected] | 74 | RECORD_EXPR_[email protected] |
75 | [email protected] | 75 | [email protected] |
76 | [email protected] "y" | 76 | [email protected] "y" |
77 | [email protected] ":" | 77 | [email protected] ":" |
@@ -100,16 +100,16 @@ [email protected] | |||
100 | [email protected] ";" | 100 | [email protected] ";" |
101 | [email protected] "\n " | 101 | [email protected] "\n " |
102 | [email protected] | 102 | [email protected] |
103 | RECORD_LIT@88..108 | 103 | RECORD_EXPR@88..108 |
104 | [email protected] | 104 | [email protected] |
105 | [email protected] | 105 | [email protected] |
106 | [email protected] | 106 | [email protected] |
107 | [email protected] "TupleStruct" | 107 | [email protected] "TupleStruct" |
108 | [email protected] " " | 108 | [email protected] " " |
109 | [email protected] | 109 | RECORD_EXPR_[email protected] |
110 | [email protected] "{" | 110 | [email protected] "{" |
111 | [email protected] " " | 111 | [email protected] " " |
112 | [email protected] | 112 | RECORD_EXPR_[email protected] |
113 | [email protected] | 113 | [email protected] |
114 | [email protected] "0" | 114 | [email protected] "0" |
115 | [email protected] ":" | 115 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast b/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast index 02656df31..de8217064 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..11 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -57,7 +57,7 @@ [email protected] | |||
57 | [email protected] "{" | 57 | [email protected] "{" |
58 | [email protected] "}" | 58 | [email protected] "}" |
59 | [email protected] "\n" | 59 | [email protected] "\n" |
60 | STRUCT_DEF@60..69 | 60 | [email protected] |
61 | [email protected] "struct" | 61 | [email protected] "struct" |
62 | [email protected] " " | 62 | [email protected] " " |
63 | [email protected] | 63 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.rast b/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.rast index 31178f86e..4368930cc 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..19 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "!" | 5 | [email protected] "!" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rast index 445d8d309..587160003 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0064_if_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..136 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast index 8e10f3673..629fea99d 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..41 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast b/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast index 177bb5514..37ca478e6 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..166 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -49,14 +49,14 @@ [email protected] | |||
49 | [email protected] " " | 49 | [email protected] " " |
50 | [email protected] ">" | 50 | [email protected] ">" |
51 | [email protected] " " | 51 | [email protected] " " |
52 | RECORD_LIT@63..77 | 52 | RECORD_EXPR@63..77 |
53 | [email protected] | 53 | [email protected] |
54 | [email protected] | 54 | [email protected] |
55 | [email protected] | 55 | [email protected] |
56 | [email protected] "Test" | 56 | [email protected] "Test" |
57 | [email protected] | 57 | RECORD_EXPR_[email protected] |
58 | [email protected] "{" | 58 | [email protected] "{" |
59 | [email protected] | 59 | RECORD_EXPR_[email protected] |
60 | [email protected] | 60 | [email protected] |
61 | [email protected] "field" | 61 | [email protected] "field" |
62 | [email protected] ":" | 62 | [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..6589e4795 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 | |||
@@ -1,24 +1,24 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | UNION_DEF@0..12 | 2 | [email protected] |
3 | [email protected] "union" | 3 | [email protected] "union" |
4 | [email protected] " " | 4 | [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" |
12 | UNION_DEF@13..50 | 12 | [email protected] |
13 | [email protected] "union" | 13 | [email protected] "union" |
14 | [email protected] " " | 14 | [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/0070_stmt_bin_expr_ambiguity.rast b/crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast index f8ff7079b..4c1165dc8 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0070_stmt_bin_expr_ambiguity.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..45 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast index 07b3d1435..673d396ee 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..96 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -72,13 +72,13 @@ [email protected] | |||
72 | [email protected] | 72 | [email protected] |
73 | [email protected] "{" | 73 | [email protected] "{" |
74 | [email protected] " " | 74 | [email protected] " " |
75 | RECORD_LIT@84..88 | 75 | RECORD_EXPR@84..88 |
76 | [email protected] | 76 | [email protected] |
77 | [email protected] | 77 | [email protected] |
78 | [email protected] | 78 | [email protected] |
79 | [email protected] "S" | 79 | [email protected] "S" |
80 | [email protected] " " | 80 | [email protected] " " |
81 | [email protected] | 81 | RECORD_EXPR_[email protected] |
82 | [email protected] "{" | 82 | [email protected] "{" |
83 | [email protected] "}" | 83 | [email protected] "}" |
84 | [email protected] " " | 84 | [email protected] " " |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rast index 665f716a8..437d7ac04 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0072_return_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..39 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast b/crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast index cc871ac0c..00cce69e6 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..20 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "Result" | 6 | [email protected] "Result" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast b/crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast index 3fd3a4391..3ca70f021 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0074_stmt_postfix_expr_ambiguity.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..83 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0075_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0075_block.rast index 97c6e6a9d..5cefc5076 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0075_block.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0075_block.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..9 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -12,7 +12,7 @@ [email protected] | |||
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "}" | 13 | [email protected] "}" |
14 | [email protected] "\n" | 14 | [email protected] "\n" |
15 | FN_DEF@10..31 | 15 | [email protected] |
16 | [email protected] "fn" | 16 | [email protected] "fn" |
17 | [email protected] " " | 17 | [email protected] " " |
18 | [email protected] | 18 | [email protected] |
@@ -38,7 +38,7 @@ [email protected] | |||
38 | [email protected] " " | 38 | [email protected] " " |
39 | [email protected] "}" | 39 | [email protected] "}" |
40 | [email protected] "\n" | 40 | [email protected] "\n" |
41 | FN_DEF@32..48 | 41 | [email protected] |
42 | [email protected] "fn" | 42 | [email protected] "fn" |
43 | [email protected] " " | 43 | [email protected] " " |
44 | [email protected] | 44 | [email protected] |
@@ -62,7 +62,7 @@ [email protected] | |||
62 | [email protected] " " | 62 | [email protected] " " |
63 | [email protected] "}" | 63 | [email protected] "}" |
64 | [email protected] "\n" | 64 | [email protected] "\n" |
65 | FN_DEF@49..64 | 65 | [email protected] |
66 | [email protected] "fn" | 66 | [email protected] "fn" |
67 | [email protected] " " | 67 | [email protected] " " |
68 | [email protected] | 68 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rast b/crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rast index e2c1a507d..96217a7fd 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0076_function_where_clause.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..28 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "foo" | 6 | [email protected] "foo" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rast index 4f3a8ed24..33e6fb93f 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0077_try_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..20 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rast b/crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rast index a08e16fab..2befc8388 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..15 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rast b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rast index 26825ef86..209711fc4 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..11 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rast b/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rast index 462d1a8bb..3c80846db 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0080_postfix_range.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..88 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast index b26ac2d36..e7629ac03 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..28 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -9,7 +9,7 @@ [email protected] | |||
9 | [email protected] " " | 9 | [email protected] " " |
10 | [email protected] | 10 | [email protected] |
11 | [email protected] "for" | 11 | [email protected] "for" |
12 | TYP[email protected] | 12 | GENERIC[email protected] |
13 | [email protected] "<" | 13 | [email protected] "<" |
14 | [email protected] | 14 | [email protected] |
15 | [email protected] "\'a" | 15 | [email protected] "\'a" |
@@ -29,7 +29,7 @@ [email protected] | |||
29 | [email protected] ")" | 29 | [email protected] ")" |
30 | [email protected] ";" | 30 | [email protected] ";" |
31 | [email protected] "\n" | 31 | [email protected] "\n" |
32 | TYPE_ALIAS_DEF@29..81 | 32 | [email protected] |
33 | [email protected] "type" | 33 | [email protected] "type" |
34 | [email protected] " " | 34 | [email protected] " " |
35 | [email protected] | 35 | [email protected] |
@@ -39,7 +39,7 @@ [email protected] | |||
39 | [email protected] " " | 39 | [email protected] " " |
40 | [email protected] | 40 | [email protected] |
41 | [email protected] "for" | 41 | [email protected] "for" |
42 | TYP[email protected] | 42 | GENERIC[email protected] |
43 | [email protected] "<" | 43 | [email protected] "<" |
44 | [email protected] | 44 | [email protected] |
45 | [email protected] "\'a" | 45 | [email protected] "\'a" |
@@ -74,7 +74,7 @@ [email protected] | |||
74 | [email protected] ")" | 74 | [email protected] ")" |
75 | [email protected] ";" | 75 | [email protected] ";" |
76 | [email protected] "\n" | 76 | [email protected] "\n" |
77 | TYPE_ALIAS_DEF@82..120 | 77 | [email protected] |
78 | [email protected] "type" | 78 | [email protected] "type" |
79 | [email protected] " " | 79 | [email protected] " " |
80 | [email protected] | 80 | [email protected] |
@@ -84,7 +84,7 @@ [email protected] | |||
84 | [email protected] " " | 84 | [email protected] " " |
85 | [email protected] | 85 | [email protected] |
86 | [email protected] "for" | 86 | [email protected] "for" |
87 | TYP[email protected] | 87 | GENERIC[email protected] |
88 | [email protected] "<" | 88 | [email protected] "<" |
89 | [email protected] | 89 | [email protected] |
90 | [email protected] "\'a" | 90 | [email protected] "\'a" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rast index 58bdf7e34..1563b1988 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0082_ref_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..199 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [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..cdbc40fe0 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 | |||
@@ -1,39 +1,39 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..11 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "Foo" | 6 | [email protected] "Foo" |
7 | [email protected] ";" | 7 | [email protected] ";" |
8 | [email protected] "\n" | 8 | [email protected] "\n" |
9 | STRUCT_DEF@12..25 | 9 | [email protected] |
10 | [email protected] "struct" | 10 | [email protected] "struct" |
11 | [email protected] " " | 11 | [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" |
19 | STRUCT_DEF@26..39 | 19 | [email protected] |
20 | [email protected] "struct" | 20 | [email protected] "struct" |
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] ";" |
28 | [email protected] "\n" | 28 | [email protected] "\n" |
29 | STRUCT_DEF@40..66 | 29 | [email protected] |
30 | [email protected] "struct" | 30 | [email protected] "struct" |
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] |
@@ -50,16 +50,16 @@ [email protected] | |||
50 | [email protected] ")" | 50 | [email protected] ")" |
51 | [email protected] ";" | 51 | [email protected] ";" |
52 | [email protected] "\n" | 52 | [email protected] "\n" |
53 | STRUCT_DEF@67..105 | 53 | [email protected] |
54 | [email protected] "struct" | 54 | [email protected] "struct" |
55 | [email protected] " " | 55 | [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/0084_paren_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rast index 9cd8910d4..ee8894966 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..15 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rast b/crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rast index 9fcb7899e..ded36949a 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0085_expr_literals.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..188 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rast index a42abc189..70e05a859 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0086_function_ret_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..11 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -12,7 +12,7 @@ [email protected] | |||
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "}" | 13 | [email protected] "}" |
14 | [email protected] "\n" | 14 | [email protected] "\n" |
15 | FN_DEF@12..29 | 15 | [email protected] |
16 | [email protected] "fn" | 16 | [email protected] "fn" |
17 | [email protected] " " | 17 | [email protected] " " |
18 | [email protected] | 18 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rast index e3223cee5..43c09affe 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..18 | 2 | [email protected] |
3 | [email protected] "unsafe" | 3 | [email protected] "unsafe" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "impl" | 5 | [email protected] "impl" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast b/crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast index 7e71d7373..34f520994 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0088_break_ambiguity.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..87 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast index 48aaf1004..405b6a259 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0089_extern_fn.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..18 | 2 | [email protected] |
3 | [email protected] | 3 | [email protected] |
4 | [email protected] "extern" | 4 | [email protected] "extern" |
5 | [email protected] " " | 5 | [email protected] " " |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rast b/crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rast index cee2bc906..2ef026e37 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..18 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S" | 6 | [email protected] "S" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rast b/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rast index 7efa4c34d..0cac9ac43 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0091_auto_trait.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TRAIT_DEF@0..15 | 2 | [email protected] |
3 | [email protected] "auto" | 3 | [email protected] "auto" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "trait" | 5 | [email protected] "trait" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast b/crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast index 1e2d7db7c..95686977f 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..20 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rast index aed81f9b0..82f03f9c1 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0093_index_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..25 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rast b/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rast index fad27be66..0ef11c682 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0094_unsafe_auto_trait.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TRAIT_DEF@0..22 | 2 | [email protected] |
3 | [email protected] "unsafe" | 3 | [email protected] "unsafe" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "auto" | 5 | [email protected] "auto" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast index 67d9595d3..25706d2a4 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0095_placeholder_pat.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..25 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast index 031e74652..cb5316a0d 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0096_no_semi_after_block.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..166 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rast index 8a839a4a6..0a1b21d6e 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..19 | 2 | [email protected] |
3 | [email protected] "default" | 3 | [email protected] "default" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "impl" | 5 | [email protected] "impl" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast index 816e49310..32a77ba49 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0098_const_unsafe_fn.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..24 | 2 | [email protected] |
3 | [email protected] "const" | 3 | [email protected] "const" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "unsafe" | 5 | [email protected] "unsafe" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rast b/crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rast index d48ef865c..1627556c8 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0099_param_list.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..9 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -12,7 +12,7 @@ [email protected] | |||
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "}" | 13 | [email protected] "}" |
14 | [email protected] "\n" | 14 | [email protected] "\n" |
15 | FN_DEF@10..25 | 15 | [email protected] |
16 | [email protected] "fn" | 16 | [email protected] "fn" |
17 | [email protected] " " | 17 | [email protected] " " |
18 | [email protected] | 18 | [email protected] |
@@ -36,7 +36,7 @@ [email protected] | |||
36 | [email protected] "{" | 36 | [email protected] "{" |
37 | [email protected] "}" | 37 | [email protected] "}" |
38 | [email protected] "\n" | 38 | [email protected] "\n" |
39 | FN_DEF@26..43 | 39 | [email protected] |
40 | [email protected] "fn" | 40 | [email protected] "fn" |
41 | [email protected] " " | 41 | [email protected] " " |
42 | [email protected] | 42 | [email protected] |
@@ -62,7 +62,7 @@ [email protected] | |||
62 | [email protected] "{" | 62 | [email protected] "{" |
63 | [email protected] "}" | 63 | [email protected] "}" |
64 | [email protected] "\n" | 64 | [email protected] "\n" |
65 | FN_DEF@44..66 | 65 | [email protected] |
66 | [email protected] "fn" | 66 | [email protected] "fn" |
67 | [email protected] " " | 67 | [email protected] " " |
68 | [email protected] | 68 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rast index e4455cd3e..766de4efe 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0100_for_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..32 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast index 8a8743060..73c94e5d4 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0101_unsafe_fn.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..18 | 2 | [email protected] |
3 | [email protected] "unsafe" | 3 | [email protected] "unsafe" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "fn" | 5 | [email protected] "fn" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast b/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast index 9f966ff8a..fe1c290c3 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..118 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rast index 9b3bef04e..c4c0a0568 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0103_array_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..54 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast b/crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast index e3c4cfeb3..3f53d60c0 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..28 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast index e64717152..51a6c5170 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..133 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rast index 98963dc62..b2961b0ff 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0107_method_call_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..48 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rast index ea603e2c9..ca7e4a5c3 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0108_tuple_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..39 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0109_label.rast b/crates/ra_syntax/test_data/parser/inline/ok/0109_label.rast index 30ff96a7c..a6a169f1b 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0109_label.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0109_label.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..73 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rast index b58f40ac1..432318da0 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0111_tuple_pat.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..93 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rast index b67714c17..3cd554d45 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0112_bind_pat.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..145 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast index 5de480da9..d761c1c68 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0113_nocontentexpr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..49 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [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 01d717d6b..0e1594dc4 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 | |||
@@ -1,18 +1,18 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..33 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "Test" | 6 | [email protected] "Test" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 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] |
@@ -40,20 +40,20 @@ [email protected] | |||
40 | [email protected] "Clone" | 40 | [email protected] "Clone" |
41 | [email protected] ";" | 41 | [email protected] ";" |
42 | [email protected] "\n" | 42 | [email protected] "\n" |
43 | STRUCT_DEF@34..52 | 43 | [email protected] |
44 | [email protected] "struct" | 44 | [email protected] "struct" |
45 | [email protected] " " | 45 | [email protected] " " |
46 | [email protected] | 46 | [email protected] |
47 | [email protected] "Test" | 47 | [email protected] "Test" |
48 | TYP[email protected] | 48 | GENERIC[email protected] |
49 | [email protected] "<" | 49 | [email protected] "<" |
50 | [email protected] | 50 | [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..4d09c9f50 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 | |||
@@ -1,14 +1,14 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..59 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [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/0117_macro_call_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rast index ddfcf974e..f3d4ad72c 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..16 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -18,7 +18,7 @@ [email protected] | |||
18 | [email protected] ")" | 18 | [email protected] ")" |
19 | [email protected] ";" | 19 | [email protected] ";" |
20 | [email protected] "\n" | 20 | [email protected] "\n" |
21 | TYPE_ALIAS_DEF@17..40 | 21 | [email protected] |
22 | [email protected] "type" | 22 | [email protected] "type" |
23 | [email protected] " " | 23 | [email protected] " " |
24 | [email protected] | 24 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rast b/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rast index ea54347fc..141a7b203 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.rast | |||
@@ -1,14 +1,14 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | ENUM_DEF@0..8 | 2 | [email protected] |
3 | [email protected] "enum" | 3 | [email protected] "enum" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "F" | 6 | [email protected] "F" |
7 | ENUM_[email protected] | 7 | [email protected] |
8 | [email protected] "{" | 8 | [email protected] "{" |
9 | [email protected] "}" | 9 | [email protected] "}" |
10 | [email protected] "\n" | 10 | [email protected] "\n" |
11 | IMPL_DEF@9..93 | 11 | [email protected] |
12 | [email protected] "impl" | 12 | [email protected] "impl" |
13 | [email protected] " " | 13 | [email protected] " " |
14 | [email protected] | 14 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rast b/crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rast index e152c6b6c..aaaf803b7 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0118_match_guard.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..57 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast b/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast index b283ab804..4b5f9cdc9 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..138 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast b/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast index 9d5470914..54cc3be3a 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..258 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast b/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast index ada2fc54e..edac8d5d9 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..63 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "foo" | 6 | [email protected] "foo" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast b/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast index b3a33c14d..f155743cf 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.rast | |||
@@ -8,7 +8,7 @@ [email protected] | |||
8 | [email protected] | 8 | [email protected] |
9 | [email protected] "{" | 9 | [email protected] "{" |
10 | [email protected] " " | 10 | [email protected] " " |
11 | FN_DEF@13..54 | 11 | [email protected] |
12 | [email protected] "fn" | 12 | [email protected] "fn" |
13 | [email protected] " " | 13 | [email protected] " " |
14 | [email protected] | 14 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast index 6178dfe59..a7df188bd 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0124_async_fn.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..17 | 2 | [email protected] |
3 | [email protected] "async" | 3 | [email protected] "async" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "fn" | 5 | [email protected] "fn" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast b/crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast index ced59b7c1..aa4d7a784 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0125_crate_keyword_path.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..26 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast index 97611f7f3..54ea2c7c6 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..45 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -11,16 +11,16 @@ [email protected] | |||
11 | [email protected] | 11 | [email protected] |
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "\n " | 13 | [email protected] "\n " |
14 | RECORD_LIT@16..43 | 14 | RECORD_EXPR@16..43 |
15 | [email protected] | 15 | [email protected] |
16 | [email protected] | 16 | [email protected] |
17 | [email protected] | 17 | [email protected] |
18 | [email protected] "S" | 18 | [email protected] "S" |
19 | [email protected] " " | 19 | [email protected] " " |
20 | [email protected] | 20 | RECORD_EXPR_[email protected] |
21 | [email protected] "{" | 21 | [email protected] "{" |
22 | [email protected] " " | 22 | [email protected] " " |
23 | [email protected] | 23 | RECORD_EXPR_[email protected] |
24 | [email protected] | 24 | [email protected] |
25 | [email protected] "#" | 25 | [email protected] "#" |
26 | [email protected] "[" | 26 | [email protected] "[" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast b/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast index 09221fc54..0342e64f3 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..81 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast index 93cc41533..3b46e5b47 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..46 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast index 0901f2348..98a20f36d 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0128_combined_fns.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..24 | 2 | [email protected] |
3 | [email protected] "async" | 3 | [email protected] "async" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "unsafe" | 5 | [email protected] "unsafe" |
@@ -16,7 +16,7 @@ [email protected] | |||
16 | [email protected] "{" | 16 | [email protected] "{" |
17 | [email protected] "}" | 17 | [email protected] "}" |
18 | [email protected] "\n" | 18 | [email protected] "\n" |
19 | FN_DEF@25..49 | 19 | [email protected] |
20 | [email protected] "const" | 20 | [email protected] "const" |
21 | [email protected] " " | 21 | [email protected] " " |
22 | [email protected] "unsafe" | 22 | [email protected] "unsafe" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rast index 28291afc2..e283966ca 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..32 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast index bb94a05c6..931e81f27 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..134 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rast index 8f2f144c7..0fe3bf582 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0130_try_block_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..32 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rast index 4a1c2b3a4..d47071a91 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..36 | 2 | [email protected] |
3 | [email protected] "existential" | 3 | [email protected] "existential" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "type" | 5 | [email protected] "type" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rast index 87ac42748..48f483813 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0132_box_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..105 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast index 3772cb64b..b8d26a53a 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..68 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -19,7 +19,7 @@ [email protected] | |||
19 | [email protected] | 19 | [email protected] |
20 | [email protected] "{" | 20 | [email protected] "{" |
21 | [email protected] "\n " | 21 | [email protected] "\n " |
22 | TYPE_ALIAS_DEF@21..42 | 22 | [email protected] |
23 | [email protected] "default" | 23 | [email protected] "default" |
24 | [email protected] " " | 24 | [email protected] " " |
25 | [email protected] "type" | 25 | [email protected] "type" |
@@ -36,7 +36,7 @@ [email protected] | |||
36 | [email protected] "Bar" | 36 | [email protected] "Bar" |
37 | [email protected] ";" | 37 | [email protected] ";" |
38 | [email protected] "\n " | 38 | [email protected] "\n " |
39 | FN_DEF@47..66 | 39 | [email protected] |
40 | [email protected] "default" | 40 | [email protected] "default" |
41 | [email protected] " " | 41 | [email protected] " " |
42 | [email protected] "fn" | 42 | [email protected] "fn" |
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 b330a0932..429a0506e 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 | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..110 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -11,21 +11,21 @@ [email protected] | |||
11 | [email protected] | 11 | [email protected] |
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "\n " | 13 | [email protected] "\n " |
14 | ENUM_DEF@27..75 | 14 | [email protected] |
15 | [email protected] "enum" | 15 | [email protected] "enum" |
16 | [email protected] " " | 16 | [email protected] " " |
17 | [email protected] | 17 | [email protected] |
18 | [email protected] "LocalEnum" | 18 | [email protected] "LocalEnum" |
19 | [email protected] " " | 19 | [email protected] " " |
20 | ENUM_[email protected] | 20 | [email protected] |
21 | [email protected] "{" | 21 | [email protected] "{" |
22 | [email protected] "\n " | 22 | [email protected] "\n " |
23 | ENUM_[email protected] | 23 | [email protected] |
24 | [email protected] | 24 | [email protected] |
25 | [email protected] "One" | 25 | [email protected] "One" |
26 | [email protected] "," | 26 | [email protected] "," |
27 | [email protected] "\n " | 27 | [email protected] "\n " |
28 | ENUM_[email protected] | 28 | [email protected] |
29 | [email protected] | 29 | [email protected] |
30 | [email protected] "Two" | 30 | [email protected] "Two" |
31 | [email protected] "," | 31 | [email protected] "," |
@@ -33,7 +33,7 @@ [email protected] | |||
33 | [email protected] "}" | 33 | [email protected] "}" |
34 | [email protected] ";" | 34 | [email protected] ";" |
35 | [email protected] "\n " | 35 | [email protected] "\n " |
36 | FN_DEF@81..90 | 36 | [email protected] |
37 | [email protected] "fn" | 37 | [email protected] "fn" |
38 | [email protected] " " | 38 | [email protected] " " |
39 | [email protected] | 39 | [email protected] |
@@ -47,13 +47,13 @@ [email protected] | |||
47 | [email protected] "}" | 47 | [email protected] "}" |
48 | [email protected] ";" | 48 | [email protected] ";" |
49 | [email protected] "\n " | 49 | [email protected] "\n " |
50 | STRUCT_DEF@96..107 | 50 | [email protected] |
51 | [email protected] "struct" | 51 | [email protected] "struct" |
52 | [email protected] " " | 52 | [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/0137_await_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rast index 8e8d9e992..923effe38 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0137_await_expr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..66 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast b/crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast index c457851c9..157513565 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0138_associated_type_bounds.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..58 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "print_all" | 6 | [email protected] "print_all" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast index ea325831e..a7f87c020 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..51 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -22,14 +22,14 @@ [email protected] | |||
22 | [email protected] " " | 22 | [email protected] " " |
23 | [email protected] "=" | 23 | [email protected] "=" |
24 | [email protected] " " | 24 | [email protected] " " |
25 | RECORD_LIT@26..33 | 25 | RECORD_EXPR@26..33 |
26 | [email protected] | 26 | [email protected] |
27 | [email protected] | 27 | [email protected] |
28 | [email protected] | 28 | [email protected] |
29 | [email protected] "F" | 29 | [email protected] "F" |
30 | [email protected] | 30 | RECORD_EXPR_[email protected] |
31 | [email protected] "{" | 31 | [email protected] "{" |
32 | [email protected] | 32 | RECORD_EXPR_[email protected] |
33 | [email protected] | 33 | [email protected] |
34 | [email protected] "x" | 34 | [email protected] "x" |
35 | [email protected] ":" | 35 | [email protected] ":" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast index 9135de9df..6403ff8d5 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..25 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast b/crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast index 14610a0a2..36fd2997b 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..27 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rast b/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rast index e6be8b7e4..d11019076 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..50 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast index 57fba5fd5..09fd9e9b8 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..117 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast index 8d8b9597b..8d0f1ead5 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0144_dot_dot_pat.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..554 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast index 7c092d518..b41ef4098 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..62 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rast b/crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rast index 8382a4f96..2d0c83458 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0146_as_precedence.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..42 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rast b/crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rast index 4b9b8e0ab..9312eab65 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..23 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S" | 6 | [email protected] "S" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] "const" | 10 | [email protected] "const" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.rast b/crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.rast index 3c00a2647..0c35bf2b7 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | CONST_DEF@0..39 | 2 | [email protected] |
3 | [email protected] "const" | 3 | [email protected] "const" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0150_impl_type_params.rast b/crates/ra_syntax/test_data/parser/inline/ok/0150_impl_type_params.rast index 77e12cad6..8f197a19d 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0150_impl_type_params.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0150_impl_type_params.rast | |||
@@ -1,7 +1,7 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..28 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | TYP[email protected] | 4 | GENERIC[email protected] |
5 | [email protected] "<" | 5 | [email protected] "<" |
6 | [email protected] | 6 | [email protected] |
7 | [email protected] "const" | 7 | [email protected] "const" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0151_trait_alias.rast b/crates/ra_syntax/test_data/parser/inline/ok/0151_trait_alias.rast index 48d73a4e7..cc220e534 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0151_trait_alias.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0151_trait_alias.rast | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TRAIT_DEF@0..18 | 2 | [email protected] |
3 | [email protected] "trait" | 3 | [email protected] "trait" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "Z" | 6 | [email protected] "Z" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
@@ -31,12 +31,12 @@ [email protected] | |||
31 | [email protected] ">" | 31 | [email protected] ">" |
32 | [email protected] ";" | 32 | [email protected] ";" |
33 | [email protected] "\n" | 33 | [email protected] "\n" |
34 | TRAIT_DEF@19..51 | 34 | [email protected] |
35 | [email protected] "trait" | 35 | [email protected] "trait" |
36 | [email protected] " " | 36 | [email protected] " " |
37 | [email protected] | 37 | [email protected] |
38 | [email protected] "Z" | 38 | [email protected] "Z" |
39 | TYP[email protected] | 39 | GENERIC[email protected] |
40 | [email protected] "<" | 40 | [email protected] "<" |
41 | [email protected] | 41 | [email protected] |
42 | [email protected] | 42 | [email protected] |
@@ -82,12 +82,12 @@ [email protected] | |||
82 | [email protected] "Copy" | 82 | [email protected] "Copy" |
83 | [email protected] ";" | 83 | [email protected] ";" |
84 | [email protected] "\n" | 84 | [email protected] "\n" |
85 | TRAIT_DEF@52..82 | 85 | [email protected] |
86 | [email protected] "trait" | 86 | [email protected] "trait" |
87 | [email protected] " " | 87 | [email protected] " " |
88 | [email protected] | 88 | [email protected] |
89 | [email protected] "Z" | 89 | [email protected] "Z" |
90 | TYP[email protected] | 90 | GENERIC[email protected] |
91 | [email protected] "<" | 91 | [email protected] "<" |
92 | [email protected] | 92 | [email protected] |
93 | [email protected] | 93 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast index f43dfbe63..2905c5f1a 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0152_arg_with_attr.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..33 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast b/crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast index 861065362..69b4d73d7 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..24 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -25,7 +25,7 @@ [email protected] | |||
25 | [email protected] ")" | 25 | [email protected] ")" |
26 | [email protected] ";" | 26 | [email protected] ";" |
27 | [email protected] "\n" | 27 | [email protected] "\n" |
28 | TYPE_ALIAS_DEF@25..54 | 28 | [email protected] |
29 | [email protected] "type" | 29 | [email protected] "type" |
30 | [email protected] " " | 30 | [email protected] " " |
31 | [email protected] | 31 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast b/crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast index ecac05950..c63a55a56 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..62 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rast b/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rast index 092833417..3b8dfefc6 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..29 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rast b/crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rast index 88d512f1a..4d4c41f1a 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0156_or_pattern.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..129 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast b/crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast index fad9df007..ccca045b6 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | TYPE_ALIAS_DEF@0..22 | 2 | [email protected] |
3 | [email protected] "type" | 3 | [email protected] "type" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [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..a2e05eb2e 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 | |||
@@ -1,19 +1,19 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | ENUM_DEF@0..22 | 2 | [email protected] |
3 | [email protected] "enum" | 3 | [email protected] "enum" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "E" | 6 | [email protected] "E" |
7 | [email protected] " " | 7 | [email protected] " " |
8 | ENUM_[email protected] | 8 | [email protected] |
9 | [email protected] "{" | 9 | [email protected] "{" |
10 | [email protected] " " | 10 | [email protected] " " |
11 | ENUM_[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/inline/ok/0158_binop_resets_statementness.rast b/crates/ra_syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rast index bd9e8d40f..8ae24b9c1 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0158_binop_resets_statementness.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..27 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast index 08333a325..9c071ec2e 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..33 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast b/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast index 5f09e4f4a..fb46d4ce4 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0159_try_macro_fallback.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..26 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rast index 9efebd8b8..9e9a5f9c5 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0161_labeled_block.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..22 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rast index 4991f2c36..ca9a1183d 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0162_unsafe_block.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..21 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast index c0b8c0300..1269621dc 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_fn.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..49 | 2 | [email protected] |
3 | [email protected] "impl" | 3 | [email protected] "impl" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -19,7 +19,7 @@ [email protected] | |||
19 | [email protected] | 19 | [email protected] |
20 | [email protected] "{" | 20 | [email protected] "{" |
21 | [email protected] "\n " | 21 | [email protected] "\n " |
22 | FN_DEF@21..47 | 22 | [email protected] |
23 | [email protected] "default" | 23 | [email protected] "default" |
24 | [email protected] " " | 24 | [email protected] " " |
25 | [email protected] "unsafe" | 25 | [email protected] "unsafe" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast index e0c338297..6bfe925af 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0163_default_unsafe_impl.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | IMPL_DEF@0..26 | 2 | [email protected] |
3 | [email protected] "default" | 3 | [email protected] "default" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] "unsafe" | 5 | [email protected] "unsafe" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast b/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast index 868899275..f5e20b93d 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast +++ b/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..32 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [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 705f7e001..a171fe7a8 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 | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..31 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S" | 6 | [email protected] "S" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
@@ -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..362892b91 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 | |||
@@ -1,14 +1,14 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..25 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [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/0005_fn_item.rast b/crates/ra_syntax/test_data/parser/ok/0005_fn_item.rast index 0ec237f8e..a7a2b11a7 100644 --- a/crates/ra_syntax/test_data/parser/ok/0005_fn_item.rast +++ b/crates/ra_syntax/test_data/parser/ok/0005_fn_item.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..12 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [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 37b452ec4..b2c1d791f 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 | |||
@@ -26,7 +26,7 @@ [email protected] | |||
26 | [email protected] | 26 | [email protected] |
27 | [email protected] "{" | 27 | [email protected] "{" |
28 | [email protected] "\n " | 28 | [email protected] "\n " |
29 | FN_DEF@31..47 | 29 | [email protected] |
30 | [email protected] "fn" | 30 | [email protected] "fn" |
31 | [email protected] " " | 31 | [email protected] " " |
32 | [email protected] | 32 | [email protected] |
@@ -40,13 +40,13 @@ [email protected] | |||
40 | [email protected] "\n " | 40 | [email protected] "\n " |
41 | [email protected] "}" | 41 | [email protected] "}" |
42 | [email protected] "\n " | 42 | [email protected] "\n " |
43 | STRUCT_DEF@52..63 | 43 | [email protected] |
44 | [email protected] "struct" | 44 | [email protected] "struct" |
45 | [email protected] " " | 45 | [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/0011_outer_attribute.rast b/crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rast index 0b9bc58e8..478fdba75 100644 --- a/crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rast +++ b/crates/ra_syntax/test_data/parser/ok/0011_outer_attribute.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..34 | 2 | [email protected] |
3 | [email protected] | 3 | [email protected] |
4 | [email protected] "#" | 4 | [email protected] "#" |
5 | [email protected] "[" | 5 | [email protected] "[" |
diff --git a/crates/ra_syntax/test_data/parser/ok/0012_visibility.rast b/crates/ra_syntax/test_data/parser/ok/0012_visibility.rast index 980b34049..83a93b5a9 100644 --- a/crates/ra_syntax/test_data/parser/ok/0012_visibility.rast +++ b/crates/ra_syntax/test_data/parser/ok/0012_visibility.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..9 | 2 | [email protected] |
3 | [email protected] "fn" | 3 | [email protected] "fn" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
@@ -12,7 +12,7 @@ [email protected] | |||
12 | [email protected] "{" | 12 | [email protected] "{" |
13 | [email protected] "}" | 13 | [email protected] "}" |
14 | [email protected] "\n" | 14 | [email protected] "\n" |
15 | FN_DEF@10..23 | 15 | [email protected] |
16 | [email protected] | 16 | [email protected] |
17 | [email protected] "pub" | 17 | [email protected] "pub" |
18 | [email protected] " " | 18 | [email protected] " " |
@@ -28,7 +28,7 @@ [email protected] | |||
28 | [email protected] "{" | 28 | [email protected] "{" |
29 | [email protected] "}" | 29 | [email protected] "}" |
30 | [email protected] "\n" | 30 | [email protected] "\n" |
31 | FN_DEF@24..44 | 31 | [email protected] |
32 | [email protected] | 32 | [email protected] |
33 | [email protected] "pub" | 33 | [email protected] "pub" |
34 | [email protected] "(" | 34 | [email protected] "(" |
@@ -47,7 +47,7 @@ [email protected] | |||
47 | [email protected] "{" | 47 | [email protected] "{" |
48 | [email protected] "}" | 48 | [email protected] "}" |
49 | [email protected] "\n" | 49 | [email protected] "\n" |
50 | FN_DEF@45..65 | 50 | [email protected] |
51 | [email protected] | 51 | [email protected] |
52 | [email protected] "pub" | 52 | [email protected] "pub" |
53 | [email protected] "(" | 53 | [email protected] "(" |
@@ -66,7 +66,7 @@ [email protected] | |||
66 | [email protected] "{" | 66 | [email protected] "{" |
67 | [email protected] "}" | 67 | [email protected] "}" |
68 | [email protected] "\n" | 68 | [email protected] "\n" |
69 | FN_DEF@66..97 | 69 | [email protected] |
70 | [email protected] | 70 | [email protected] |
71 | [email protected] "pub" | 71 | [email protected] "pub" |
72 | [email protected] "(" | 72 | [email protected] "(" |
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..b15f41dd7 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 | |||
@@ -1,41 +1,41 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..9 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "A" | 6 | [email protected] "A" |
7 | [email protected] ";" | 7 | [email protected] ";" |
8 | [email protected] "\n" | 8 | [email protected] "\n" |
9 | STRUCT_DEF@10..21 | 9 | [email protected] |
10 | [email protected] "struct" | 10 | [email protected] "struct" |
11 | [email protected] " " | 11 | [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" |
19 | STRUCT_DEF@22..33 | 19 | [email protected] |
20 | [email protected] "struct" | 20 | [email protected] "struct" |
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] ";" |
28 | [email protected] "\n\n" | 28 | [email protected] "\n\n" |
29 | STRUCT_DEF@35..74 | 29 | [email protected] |
30 | [email protected] "struct" | 30 | [email protected] "struct" |
31 | [email protected] " " | 31 | [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] " " |
@@ -63,14 +63,14 @@ [email protected] | |||
63 | [email protected] "\n" | 63 | [email protected] "\n" |
64 | [email protected] "}" | 64 | [email protected] "}" |
65 | [email protected] "\n\n" | 65 | [email protected] "\n\n" |
66 | STRUCT_DEF@76..96 | 66 | [email protected] |
67 | [email protected] "struct" | 67 | [email protected] "struct" |
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/0017_attr_trailing_comma.rast b/crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rast index 964cbf5dd..a3e091ad3 100644 --- a/crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rast +++ b/crates/ra_syntax/test_data/parser/ok/0017_attr_trailing_comma.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | FN_DEF@0..22 | 2 | [email protected] |
3 | [email protected] | 3 | [email protected] |
4 | [email protected] "#" | 4 | [email protected] "#" |
5 | [email protected] "[" | 5 | [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 451634e3f..630aa0708 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 | |||
@@ -1,10 +1,10 @@ | |||
1 | [email protected] | 1 | [email protected] |
2 | STRUCT_DEF@0..13 | 2 | [email protected] |
3 | [email protected] "struct" | 3 | [email protected] "struct" |
4 | [email protected] " " | 4 | [email protected] " " |
5 | [email protected] | 5 | [email protected] |
6 | [email protected] "S1" | 6 | [email protected] "S1" |
7 | TYP[email protected] | 7 | GENERIC[email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] | 10 | [email protected] |
@@ -12,20 +12,20 @@ [email protected] | |||
12 | [email protected] ">" | 12 | [email protected] ">" |
13 | [email protected] ";" | 13 | [email protected] ";" |
14 | [email protected] "\n" | 14 | [email protected] "\n" |
15 | STRUCT_DEF@14..32 | 15 | [email protected] |
16 | [email protected] "struct" | 16 | [email protected] "struct" |
17 | [email protected] " " | 17 | [email protected] " " |
18 | [email protected] | 18 | [email protected] |
19 | [email protected] "S2" | 19 | [email protected] "S2" |
20 | TYP[email protected] | 20 | GENERIC[email protected] |
21 | [email protected] "<" | 21 | [email protected] "<" |
22 | [email protected] | 22 | [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] |
@@ -34,22 +34,22 @@ [email protected] | |||
34 | [email protected] ")" | 34 | [email protected] ")" |
35 | [email protected] ";" | 35 | [email protected] ";" |
36 | [email protected] "\n" | 36 | [email protected] "\n" |
37 | STRUCT_DEF@33..56 | 37 | [email protected] |
38 | [email protected] "struct" | 38 | [email protected] "struct" |
39 | [email protected] " " | 39 | [email protected] " " |
40 | [email protected] | 40 | [email protected] |
41 | [email protected] "S3" | 41 | [email protected] "S3" |
42 | TYP[email protected] | 42 | GENERIC[email protected] |
43 | [email protected] "<" | 43 | [email protected] "<" |
44 | [email protected] | 44 | [email protected] |
45 | [email protected] | 45 | [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] " " |