diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-31 18:05:12 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-31 18:05:12 +0000 |
commit | 1dc5608d0bb6bf2eee5a1b9190fcb2f8cdfa2ef3 (patch) | |
tree | b3c8a97880c625a81a814f4afa4e461ce5a58b82 /crates/ra_syntax/src | |
parent | e60ef6260f49b2b0438f8649ca71034fbafef631 (diff) | |
parent | c09e14a4ff02f774460a70472e1aeb3c598e01dc (diff) |
Merge #176
176: Move completio to ra_analysis r=matklad a=matklad
While we should handle completion for isolated file, it's better
achieved by using empty Analysis, rather than working only with &File:
we need memoization for type inference even inside a single file.
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 198 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs.tera | 2 |
2 files changed, 100 insertions, 100 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 9ba775e1c..d0cd060d3 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -15,7 +15,7 @@ use crate::{ | |||
15 | pub struct ArgListNode(SyntaxNode); | 15 | pub struct ArgListNode(SyntaxNode); |
16 | 16 | ||
17 | impl ArgListNode { | 17 | impl ArgListNode { |
18 | pub fn new(&self, ast: ArgList) -> ArgListNode { | 18 | pub fn new(ast: ArgList) -> ArgListNode { |
19 | let syntax = ast.syntax().owned(); | 19 | let syntax = ast.syntax().owned(); |
20 | ArgListNode(syntax) | 20 | ArgListNode(syntax) |
21 | } | 21 | } |
@@ -50,7 +50,7 @@ impl<'a> ArgList<'a> { | |||
50 | pub struct ArrayExprNode(SyntaxNode); | 50 | pub struct ArrayExprNode(SyntaxNode); |
51 | 51 | ||
52 | impl ArrayExprNode { | 52 | impl ArrayExprNode { |
53 | pub fn new(&self, ast: ArrayExpr) -> ArrayExprNode { | 53 | pub fn new(ast: ArrayExpr) -> ArrayExprNode { |
54 | let syntax = ast.syntax().owned(); | 54 | let syntax = ast.syntax().owned(); |
55 | ArrayExprNode(syntax) | 55 | ArrayExprNode(syntax) |
56 | } | 56 | } |
@@ -81,7 +81,7 @@ impl<'a> ArrayExpr<'a> {} | |||
81 | pub struct ArrayTypeNode(SyntaxNode); | 81 | pub struct ArrayTypeNode(SyntaxNode); |
82 | 82 | ||
83 | impl ArrayTypeNode { | 83 | impl ArrayTypeNode { |
84 | pub fn new(&self, ast: ArrayType) -> ArrayTypeNode { | 84 | pub fn new(ast: ArrayType) -> ArrayTypeNode { |
85 | let syntax = ast.syntax().owned(); | 85 | let syntax = ast.syntax().owned(); |
86 | ArrayTypeNode(syntax) | 86 | ArrayTypeNode(syntax) |
87 | } | 87 | } |
@@ -112,7 +112,7 @@ impl<'a> ArrayType<'a> {} | |||
112 | pub struct AttrNode(SyntaxNode); | 112 | pub struct AttrNode(SyntaxNode); |
113 | 113 | ||
114 | impl AttrNode { | 114 | impl AttrNode { |
115 | pub fn new(&self, ast: Attr) -> AttrNode { | 115 | pub fn new(ast: Attr) -> AttrNode { |
116 | let syntax = ast.syntax().owned(); | 116 | let syntax = ast.syntax().owned(); |
117 | AttrNode(syntax) | 117 | AttrNode(syntax) |
118 | } | 118 | } |
@@ -147,7 +147,7 @@ impl<'a> Attr<'a> { | |||
147 | pub struct BinExprNode(SyntaxNode); | 147 | pub struct BinExprNode(SyntaxNode); |
148 | 148 | ||
149 | impl BinExprNode { | 149 | impl BinExprNode { |
150 | pub fn new(&self, ast: BinExpr) -> BinExprNode { | 150 | pub fn new(ast: BinExpr) -> BinExprNode { |
151 | let syntax = ast.syntax().owned(); | 151 | let syntax = ast.syntax().owned(); |
152 | BinExprNode(syntax) | 152 | BinExprNode(syntax) |
153 | } | 153 | } |
@@ -178,7 +178,7 @@ impl<'a> BinExpr<'a> {} | |||
178 | pub struct BindPatNode(SyntaxNode); | 178 | pub struct BindPatNode(SyntaxNode); |
179 | 179 | ||
180 | impl BindPatNode { | 180 | impl BindPatNode { |
181 | pub fn new(&self, ast: BindPat) -> BindPatNode { | 181 | pub fn new(ast: BindPat) -> BindPatNode { |
182 | let syntax = ast.syntax().owned(); | 182 | let syntax = ast.syntax().owned(); |
183 | BindPatNode(syntax) | 183 | BindPatNode(syntax) |
184 | } | 184 | } |
@@ -210,7 +210,7 @@ impl<'a> BindPat<'a> {} | |||
210 | pub struct BlockNode(SyntaxNode); | 210 | pub struct BlockNode(SyntaxNode); |
211 | 211 | ||
212 | impl BlockNode { | 212 | impl BlockNode { |
213 | pub fn new(&self, ast: Block) -> BlockNode { | 213 | pub fn new(ast: Block) -> BlockNode { |
214 | let syntax = ast.syntax().owned(); | 214 | let syntax = ast.syntax().owned(); |
215 | BlockNode(syntax) | 215 | BlockNode(syntax) |
216 | } | 216 | } |
@@ -249,7 +249,7 @@ impl<'a> Block<'a> { | |||
249 | pub struct BlockExprNode(SyntaxNode); | 249 | pub struct BlockExprNode(SyntaxNode); |
250 | 250 | ||
251 | impl BlockExprNode { | 251 | impl BlockExprNode { |
252 | pub fn new(&self, ast: BlockExpr) -> BlockExprNode { | 252 | pub fn new(ast: BlockExpr) -> BlockExprNode { |
253 | let syntax = ast.syntax().owned(); | 253 | let syntax = ast.syntax().owned(); |
254 | BlockExprNode(syntax) | 254 | BlockExprNode(syntax) |
255 | } | 255 | } |
@@ -284,7 +284,7 @@ impl<'a> BlockExpr<'a> { | |||
284 | pub struct BreakExprNode(SyntaxNode); | 284 | pub struct BreakExprNode(SyntaxNode); |
285 | 285 | ||
286 | impl BreakExprNode { | 286 | impl BreakExprNode { |
287 | pub fn new(&self, ast: BreakExpr) -> BreakExprNode { | 287 | pub fn new(ast: BreakExpr) -> BreakExprNode { |
288 | let syntax = ast.syntax().owned(); | 288 | let syntax = ast.syntax().owned(); |
289 | BreakExprNode(syntax) | 289 | BreakExprNode(syntax) |
290 | } | 290 | } |
@@ -315,7 +315,7 @@ impl<'a> BreakExpr<'a> {} | |||
315 | pub struct CallExprNode(SyntaxNode); | 315 | pub struct CallExprNode(SyntaxNode); |
316 | 316 | ||
317 | impl CallExprNode { | 317 | impl CallExprNode { |
318 | pub fn new(&self, ast: CallExpr) -> CallExprNode { | 318 | pub fn new(ast: CallExpr) -> CallExprNode { |
319 | let syntax = ast.syntax().owned(); | 319 | let syntax = ast.syntax().owned(); |
320 | CallExprNode(syntax) | 320 | CallExprNode(syntax) |
321 | } | 321 | } |
@@ -351,7 +351,7 @@ impl<'a> CallExpr<'a> { | |||
351 | pub struct CastExprNode(SyntaxNode); | 351 | pub struct CastExprNode(SyntaxNode); |
352 | 352 | ||
353 | impl CastExprNode { | 353 | impl CastExprNode { |
354 | pub fn new(&self, ast: CastExpr) -> CastExprNode { | 354 | pub fn new(ast: CastExpr) -> CastExprNode { |
355 | let syntax = ast.syntax().owned(); | 355 | let syntax = ast.syntax().owned(); |
356 | CastExprNode(syntax) | 356 | CastExprNode(syntax) |
357 | } | 357 | } |
@@ -382,7 +382,7 @@ impl<'a> CastExpr<'a> {} | |||
382 | pub struct CommentNode(SyntaxNode); | 382 | pub struct CommentNode(SyntaxNode); |
383 | 383 | ||
384 | impl CommentNode { | 384 | impl CommentNode { |
385 | pub fn new(&self, ast: Comment) -> CommentNode { | 385 | pub fn new(ast: Comment) -> CommentNode { |
386 | let syntax = ast.syntax().owned(); | 386 | let syntax = ast.syntax().owned(); |
387 | CommentNode(syntax) | 387 | CommentNode(syntax) |
388 | } | 388 | } |
@@ -413,7 +413,7 @@ impl<'a> Comment<'a> {} | |||
413 | pub struct ConditionNode(SyntaxNode); | 413 | pub struct ConditionNode(SyntaxNode); |
414 | 414 | ||
415 | impl ConditionNode { | 415 | impl ConditionNode { |
416 | pub fn new(&self, ast: Condition) -> ConditionNode { | 416 | pub fn new(ast: Condition) -> ConditionNode { |
417 | let syntax = ast.syntax().owned(); | 417 | let syntax = ast.syntax().owned(); |
418 | ConditionNode(syntax) | 418 | ConditionNode(syntax) |
419 | } | 419 | } |
@@ -452,7 +452,7 @@ impl<'a> Condition<'a> { | |||
452 | pub struct ConstDefNode(SyntaxNode); | 452 | pub struct ConstDefNode(SyntaxNode); |
453 | 453 | ||
454 | impl ConstDefNode { | 454 | impl ConstDefNode { |
455 | pub fn new(&self, ast: ConstDef) -> ConstDefNode { | 455 | pub fn new(ast: ConstDef) -> ConstDefNode { |
456 | let syntax = ast.syntax().owned(); | 456 | let syntax = ast.syntax().owned(); |
457 | ConstDefNode(syntax) | 457 | ConstDefNode(syntax) |
458 | } | 458 | } |
@@ -486,7 +486,7 @@ impl<'a> ConstDef<'a> {} | |||
486 | pub struct ContinueExprNode(SyntaxNode); | 486 | pub struct ContinueExprNode(SyntaxNode); |
487 | 487 | ||
488 | impl ContinueExprNode { | 488 | impl ContinueExprNode { |
489 | pub fn new(&self, ast: ContinueExpr) -> ContinueExprNode { | 489 | pub fn new(ast: ContinueExpr) -> ContinueExprNode { |
490 | let syntax = ast.syntax().owned(); | 490 | let syntax = ast.syntax().owned(); |
491 | ContinueExprNode(syntax) | 491 | ContinueExprNode(syntax) |
492 | } | 492 | } |
@@ -517,7 +517,7 @@ impl<'a> ContinueExpr<'a> {} | |||
517 | pub struct DynTraitTypeNode(SyntaxNode); | 517 | pub struct DynTraitTypeNode(SyntaxNode); |
518 | 518 | ||
519 | impl DynTraitTypeNode { | 519 | impl DynTraitTypeNode { |
520 | pub fn new(&self, ast: DynTraitType) -> DynTraitTypeNode { | 520 | pub fn new(ast: DynTraitType) -> DynTraitTypeNode { |
521 | let syntax = ast.syntax().owned(); | 521 | let syntax = ast.syntax().owned(); |
522 | DynTraitTypeNode(syntax) | 522 | DynTraitTypeNode(syntax) |
523 | } | 523 | } |
@@ -548,7 +548,7 @@ impl<'a> DynTraitType<'a> {} | |||
548 | pub struct EnumDefNode(SyntaxNode); | 548 | pub struct EnumDefNode(SyntaxNode); |
549 | 549 | ||
550 | impl EnumDefNode { | 550 | impl EnumDefNode { |
551 | pub fn new(&self, ast: EnumDef) -> EnumDefNode { | 551 | pub fn new(ast: EnumDef) -> EnumDefNode { |
552 | let syntax = ast.syntax().owned(); | 552 | let syntax = ast.syntax().owned(); |
553 | EnumDefNode(syntax) | 553 | EnumDefNode(syntax) |
554 | } | 554 | } |
@@ -582,7 +582,7 @@ impl<'a> EnumDef<'a> {} | |||
582 | pub struct ExprNode(SyntaxNode); | 582 | pub struct ExprNode(SyntaxNode); |
583 | 583 | ||
584 | impl ExprNode { | 584 | impl ExprNode { |
585 | pub fn new(&self, ast: Expr) -> ExprNode { | 585 | pub fn new(ast: Expr) -> ExprNode { |
586 | let syntax = ast.syntax().owned(); | 586 | let syntax = ast.syntax().owned(); |
587 | ExprNode(syntax) | 587 | ExprNode(syntax) |
588 | } | 588 | } |
@@ -710,7 +710,7 @@ impl<'a> Expr<'a> {} | |||
710 | pub struct ExprStmtNode(SyntaxNode); | 710 | pub struct ExprStmtNode(SyntaxNode); |
711 | 711 | ||
712 | impl ExprStmtNode { | 712 | impl ExprStmtNode { |
713 | pub fn new(&self, ast: ExprStmt) -> ExprStmtNode { | 713 | pub fn new(ast: ExprStmt) -> ExprStmtNode { |
714 | let syntax = ast.syntax().owned(); | 714 | let syntax = ast.syntax().owned(); |
715 | ExprStmtNode(syntax) | 715 | ExprStmtNode(syntax) |
716 | } | 716 | } |
@@ -745,7 +745,7 @@ impl<'a> ExprStmt<'a> { | |||
745 | pub struct ExternCrateItemNode(SyntaxNode); | 745 | pub struct ExternCrateItemNode(SyntaxNode); |
746 | 746 | ||
747 | impl ExternCrateItemNode { | 747 | impl ExternCrateItemNode { |
748 | pub fn new(&self, ast: ExternCrateItem) -> ExternCrateItemNode { | 748 | pub fn new(ast: ExternCrateItem) -> ExternCrateItemNode { |
749 | let syntax = ast.syntax().owned(); | 749 | let syntax = ast.syntax().owned(); |
750 | ExternCrateItemNode(syntax) | 750 | ExternCrateItemNode(syntax) |
751 | } | 751 | } |
@@ -776,7 +776,7 @@ impl<'a> ExternCrateItem<'a> {} | |||
776 | pub struct FieldExprNode(SyntaxNode); | 776 | pub struct FieldExprNode(SyntaxNode); |
777 | 777 | ||
778 | impl FieldExprNode { | 778 | impl FieldExprNode { |
779 | pub fn new(&self, ast: FieldExpr) -> FieldExprNode { | 779 | pub fn new(ast: FieldExpr) -> FieldExprNode { |
780 | let syntax = ast.syntax().owned(); | 780 | let syntax = ast.syntax().owned(); |
781 | FieldExprNode(syntax) | 781 | FieldExprNode(syntax) |
782 | } | 782 | } |
@@ -807,7 +807,7 @@ impl<'a> FieldExpr<'a> {} | |||
807 | pub struct FieldPatListNode(SyntaxNode); | 807 | pub struct FieldPatListNode(SyntaxNode); |
808 | 808 | ||
809 | impl FieldPatListNode { | 809 | impl FieldPatListNode { |
810 | pub fn new(&self, ast: FieldPatList) -> FieldPatListNode { | 810 | pub fn new(ast: FieldPatList) -> FieldPatListNode { |
811 | let syntax = ast.syntax().owned(); | 811 | let syntax = ast.syntax().owned(); |
812 | FieldPatListNode(syntax) | 812 | FieldPatListNode(syntax) |
813 | } | 813 | } |
@@ -838,7 +838,7 @@ impl<'a> FieldPatList<'a> {} | |||
838 | pub struct FnDefNode(SyntaxNode); | 838 | pub struct FnDefNode(SyntaxNode); |
839 | 839 | ||
840 | impl FnDefNode { | 840 | impl FnDefNode { |
841 | pub fn new(&self, ast: FnDef) -> FnDefNode { | 841 | pub fn new(ast: FnDef) -> FnDefNode { |
842 | let syntax = ast.syntax().owned(); | 842 | let syntax = ast.syntax().owned(); |
843 | FnDefNode(syntax) | 843 | FnDefNode(syntax) |
844 | } | 844 | } |
@@ -884,7 +884,7 @@ impl<'a> FnDef<'a> { | |||
884 | pub struct FnPointerTypeNode(SyntaxNode); | 884 | pub struct FnPointerTypeNode(SyntaxNode); |
885 | 885 | ||
886 | impl FnPointerTypeNode { | 886 | impl FnPointerTypeNode { |
887 | pub fn new(&self, ast: FnPointerType) -> FnPointerTypeNode { | 887 | pub fn new(ast: FnPointerType) -> FnPointerTypeNode { |
888 | let syntax = ast.syntax().owned(); | 888 | let syntax = ast.syntax().owned(); |
889 | FnPointerTypeNode(syntax) | 889 | FnPointerTypeNode(syntax) |
890 | } | 890 | } |
@@ -915,7 +915,7 @@ impl<'a> FnPointerType<'a> {} | |||
915 | pub struct ForExprNode(SyntaxNode); | 915 | pub struct ForExprNode(SyntaxNode); |
916 | 916 | ||
917 | impl ForExprNode { | 917 | impl ForExprNode { |
918 | pub fn new(&self, ast: ForExpr) -> ForExprNode { | 918 | pub fn new(ast: ForExpr) -> ForExprNode { |
919 | let syntax = ast.syntax().owned(); | 919 | let syntax = ast.syntax().owned(); |
920 | ForExprNode(syntax) | 920 | ForExprNode(syntax) |
921 | } | 921 | } |
@@ -955,7 +955,7 @@ impl<'a> ForExpr<'a> { | |||
955 | pub struct ForTypeNode(SyntaxNode); | 955 | pub struct ForTypeNode(SyntaxNode); |
956 | 956 | ||
957 | impl ForTypeNode { | 957 | impl ForTypeNode { |
958 | pub fn new(&self, ast: ForType) -> ForTypeNode { | 958 | pub fn new(ast: ForType) -> ForTypeNode { |
959 | let syntax = ast.syntax().owned(); | 959 | let syntax = ast.syntax().owned(); |
960 | ForTypeNode(syntax) | 960 | ForTypeNode(syntax) |
961 | } | 961 | } |
@@ -986,7 +986,7 @@ impl<'a> ForType<'a> {} | |||
986 | pub struct IfExprNode(SyntaxNode); | 986 | pub struct IfExprNode(SyntaxNode); |
987 | 987 | ||
988 | impl IfExprNode { | 988 | impl IfExprNode { |
989 | pub fn new(&self, ast: IfExpr) -> IfExprNode { | 989 | pub fn new(ast: IfExpr) -> IfExprNode { |
990 | let syntax = ast.syntax().owned(); | 990 | let syntax = ast.syntax().owned(); |
991 | IfExprNode(syntax) | 991 | IfExprNode(syntax) |
992 | } | 992 | } |
@@ -1021,7 +1021,7 @@ impl<'a> IfExpr<'a> { | |||
1021 | pub struct ImplItemNode(SyntaxNode); | 1021 | pub struct ImplItemNode(SyntaxNode); |
1022 | 1022 | ||
1023 | impl ImplItemNode { | 1023 | impl ImplItemNode { |
1024 | pub fn new(&self, ast: ImplItem) -> ImplItemNode { | 1024 | pub fn new(ast: ImplItem) -> ImplItemNode { |
1025 | let syntax = ast.syntax().owned(); | 1025 | let syntax = ast.syntax().owned(); |
1026 | ImplItemNode(syntax) | 1026 | ImplItemNode(syntax) |
1027 | } | 1027 | } |
@@ -1052,7 +1052,7 @@ impl<'a> ImplItem<'a> {} | |||
1052 | pub struct ImplTraitTypeNode(SyntaxNode); | 1052 | pub struct ImplTraitTypeNode(SyntaxNode); |
1053 | 1053 | ||
1054 | impl ImplTraitTypeNode { | 1054 | impl ImplTraitTypeNode { |
1055 | pub fn new(&self, ast: ImplTraitType) -> ImplTraitTypeNode { | 1055 | pub fn new(ast: ImplTraitType) -> ImplTraitTypeNode { |
1056 | let syntax = ast.syntax().owned(); | 1056 | let syntax = ast.syntax().owned(); |
1057 | ImplTraitTypeNode(syntax) | 1057 | ImplTraitTypeNode(syntax) |
1058 | } | 1058 | } |
@@ -1083,7 +1083,7 @@ impl<'a> ImplTraitType<'a> {} | |||
1083 | pub struct IndexExprNode(SyntaxNode); | 1083 | pub struct IndexExprNode(SyntaxNode); |
1084 | 1084 | ||
1085 | impl IndexExprNode { | 1085 | impl IndexExprNode { |
1086 | pub fn new(&self, ast: IndexExpr) -> IndexExprNode { | 1086 | pub fn new(ast: IndexExpr) -> IndexExprNode { |
1087 | let syntax = ast.syntax().owned(); | 1087 | let syntax = ast.syntax().owned(); |
1088 | IndexExprNode(syntax) | 1088 | IndexExprNode(syntax) |
1089 | } | 1089 | } |
@@ -1114,7 +1114,7 @@ impl<'a> IndexExpr<'a> {} | |||
1114 | pub struct ItemListNode(SyntaxNode); | 1114 | pub struct ItemListNode(SyntaxNode); |
1115 | 1115 | ||
1116 | impl ItemListNode { | 1116 | impl ItemListNode { |
1117 | pub fn new(&self, ast: ItemList) -> ItemListNode { | 1117 | pub fn new(ast: ItemList) -> ItemListNode { |
1118 | let syntax = ast.syntax().owned(); | 1118 | let syntax = ast.syntax().owned(); |
1119 | ItemListNode(syntax) | 1119 | ItemListNode(syntax) |
1120 | } | 1120 | } |
@@ -1147,7 +1147,7 @@ impl<'a> ItemList<'a> {} | |||
1147 | pub struct LabelNode(SyntaxNode); | 1147 | pub struct LabelNode(SyntaxNode); |
1148 | 1148 | ||
1149 | impl LabelNode { | 1149 | impl LabelNode { |
1150 | pub fn new(&self, ast: Label) -> LabelNode { | 1150 | pub fn new(ast: Label) -> LabelNode { |
1151 | let syntax = ast.syntax().owned(); | 1151 | let syntax = ast.syntax().owned(); |
1152 | LabelNode(syntax) | 1152 | LabelNode(syntax) |
1153 | } | 1153 | } |
@@ -1178,7 +1178,7 @@ impl<'a> Label<'a> {} | |||
1178 | pub struct LambdaExprNode(SyntaxNode); | 1178 | pub struct LambdaExprNode(SyntaxNode); |
1179 | 1179 | ||
1180 | impl LambdaExprNode { | 1180 | impl LambdaExprNode { |
1181 | pub fn new(&self, ast: LambdaExpr) -> LambdaExprNode { | 1181 | pub fn new(ast: LambdaExpr) -> LambdaExprNode { |
1182 | let syntax = ast.syntax().owned(); | 1182 | let syntax = ast.syntax().owned(); |
1183 | LambdaExprNode(syntax) | 1183 | LambdaExprNode(syntax) |
1184 | } | 1184 | } |
@@ -1217,7 +1217,7 @@ impl<'a> LambdaExpr<'a> { | |||
1217 | pub struct LetStmtNode(SyntaxNode); | 1217 | pub struct LetStmtNode(SyntaxNode); |
1218 | 1218 | ||
1219 | impl LetStmtNode { | 1219 | impl LetStmtNode { |
1220 | pub fn new(&self, ast: LetStmt) -> LetStmtNode { | 1220 | pub fn new(ast: LetStmt) -> LetStmtNode { |
1221 | let syntax = ast.syntax().owned(); | 1221 | let syntax = ast.syntax().owned(); |
1222 | LetStmtNode(syntax) | 1222 | LetStmtNode(syntax) |
1223 | } | 1223 | } |
@@ -1256,7 +1256,7 @@ impl<'a> LetStmt<'a> { | |||
1256 | pub struct LifetimeNode(SyntaxNode); | 1256 | pub struct LifetimeNode(SyntaxNode); |
1257 | 1257 | ||
1258 | impl LifetimeNode { | 1258 | impl LifetimeNode { |
1259 | pub fn new(&self, ast: Lifetime) -> LifetimeNode { | 1259 | pub fn new(ast: Lifetime) -> LifetimeNode { |
1260 | let syntax = ast.syntax().owned(); | 1260 | let syntax = ast.syntax().owned(); |
1261 | LifetimeNode(syntax) | 1261 | LifetimeNode(syntax) |
1262 | } | 1262 | } |
@@ -1287,7 +1287,7 @@ impl<'a> Lifetime<'a> {} | |||
1287 | pub struct LifetimeParamNode(SyntaxNode); | 1287 | pub struct LifetimeParamNode(SyntaxNode); |
1288 | 1288 | ||
1289 | impl LifetimeParamNode { | 1289 | impl LifetimeParamNode { |
1290 | pub fn new(&self, ast: LifetimeParam) -> LifetimeParamNode { | 1290 | pub fn new(ast: LifetimeParam) -> LifetimeParamNode { |
1291 | let syntax = ast.syntax().owned(); | 1291 | let syntax = ast.syntax().owned(); |
1292 | LifetimeParamNode(syntax) | 1292 | LifetimeParamNode(syntax) |
1293 | } | 1293 | } |
@@ -1322,7 +1322,7 @@ impl<'a> LifetimeParam<'a> { | |||
1322 | pub struct LiteralNode(SyntaxNode); | 1322 | pub struct LiteralNode(SyntaxNode); |
1323 | 1323 | ||
1324 | impl LiteralNode { | 1324 | impl LiteralNode { |
1325 | pub fn new(&self, ast: Literal) -> LiteralNode { | 1325 | pub fn new(ast: Literal) -> LiteralNode { |
1326 | let syntax = ast.syntax().owned(); | 1326 | let syntax = ast.syntax().owned(); |
1327 | LiteralNode(syntax) | 1327 | LiteralNode(syntax) |
1328 | } | 1328 | } |
@@ -1353,7 +1353,7 @@ impl<'a> Literal<'a> {} | |||
1353 | pub struct LoopExprNode(SyntaxNode); | 1353 | pub struct LoopExprNode(SyntaxNode); |
1354 | 1354 | ||
1355 | impl LoopExprNode { | 1355 | impl LoopExprNode { |
1356 | pub fn new(&self, ast: LoopExpr) -> LoopExprNode { | 1356 | pub fn new(ast: LoopExpr) -> LoopExprNode { |
1357 | let syntax = ast.syntax().owned(); | 1357 | let syntax = ast.syntax().owned(); |
1358 | LoopExprNode(syntax) | 1358 | LoopExprNode(syntax) |
1359 | } | 1359 | } |
@@ -1385,7 +1385,7 @@ impl<'a> LoopExpr<'a> {} | |||
1385 | pub struct MatchArmNode(SyntaxNode); | 1385 | pub struct MatchArmNode(SyntaxNode); |
1386 | 1386 | ||
1387 | impl MatchArmNode { | 1387 | impl MatchArmNode { |
1388 | pub fn new(&self, ast: MatchArm) -> MatchArmNode { | 1388 | pub fn new(ast: MatchArm) -> MatchArmNode { |
1389 | let syntax = ast.syntax().owned(); | 1389 | let syntax = ast.syntax().owned(); |
1390 | MatchArmNode(syntax) | 1390 | MatchArmNode(syntax) |
1391 | } | 1391 | } |
@@ -1428,7 +1428,7 @@ impl<'a> MatchArm<'a> { | |||
1428 | pub struct MatchArmListNode(SyntaxNode); | 1428 | pub struct MatchArmListNode(SyntaxNode); |
1429 | 1429 | ||
1430 | impl MatchArmListNode { | 1430 | impl MatchArmListNode { |
1431 | pub fn new(&self, ast: MatchArmList) -> MatchArmListNode { | 1431 | pub fn new(ast: MatchArmList) -> MatchArmListNode { |
1432 | let syntax = ast.syntax().owned(); | 1432 | let syntax = ast.syntax().owned(); |
1433 | MatchArmListNode(syntax) | 1433 | MatchArmListNode(syntax) |
1434 | } | 1434 | } |
@@ -1463,7 +1463,7 @@ impl<'a> MatchArmList<'a> { | |||
1463 | pub struct MatchExprNode(SyntaxNode); | 1463 | pub struct MatchExprNode(SyntaxNode); |
1464 | 1464 | ||
1465 | impl MatchExprNode { | 1465 | impl MatchExprNode { |
1466 | pub fn new(&self, ast: MatchExpr) -> MatchExprNode { | 1466 | pub fn new(ast: MatchExpr) -> MatchExprNode { |
1467 | let syntax = ast.syntax().owned(); | 1467 | let syntax = ast.syntax().owned(); |
1468 | MatchExprNode(syntax) | 1468 | MatchExprNode(syntax) |
1469 | } | 1469 | } |
@@ -1502,7 +1502,7 @@ impl<'a> MatchExpr<'a> { | |||
1502 | pub struct MatchGuardNode(SyntaxNode); | 1502 | pub struct MatchGuardNode(SyntaxNode); |
1503 | 1503 | ||
1504 | impl MatchGuardNode { | 1504 | impl MatchGuardNode { |
1505 | pub fn new(&self, ast: MatchGuard) -> MatchGuardNode { | 1505 | pub fn new(ast: MatchGuard) -> MatchGuardNode { |
1506 | let syntax = ast.syntax().owned(); | 1506 | let syntax = ast.syntax().owned(); |
1507 | MatchGuardNode(syntax) | 1507 | MatchGuardNode(syntax) |
1508 | } | 1508 | } |
@@ -1533,7 +1533,7 @@ impl<'a> MatchGuard<'a> {} | |||
1533 | pub struct MethodCallExprNode(SyntaxNode); | 1533 | pub struct MethodCallExprNode(SyntaxNode); |
1534 | 1534 | ||
1535 | impl MethodCallExprNode { | 1535 | impl MethodCallExprNode { |
1536 | pub fn new(&self, ast: MethodCallExpr) -> MethodCallExprNode { | 1536 | pub fn new(ast: MethodCallExpr) -> MethodCallExprNode { |
1537 | let syntax = ast.syntax().owned(); | 1537 | let syntax = ast.syntax().owned(); |
1538 | MethodCallExprNode(syntax) | 1538 | MethodCallExprNode(syntax) |
1539 | } | 1539 | } |
@@ -1569,7 +1569,7 @@ impl<'a> MethodCallExpr<'a> { | |||
1569 | pub struct ModuleNode(SyntaxNode); | 1569 | pub struct ModuleNode(SyntaxNode); |
1570 | 1570 | ||
1571 | impl ModuleNode { | 1571 | impl ModuleNode { |
1572 | pub fn new(&self, ast: Module) -> ModuleNode { | 1572 | pub fn new(ast: Module) -> ModuleNode { |
1573 | let syntax = ast.syntax().owned(); | 1573 | let syntax = ast.syntax().owned(); |
1574 | ModuleNode(syntax) | 1574 | ModuleNode(syntax) |
1575 | } | 1575 | } |
@@ -1606,7 +1606,7 @@ impl<'a> Module<'a> { | |||
1606 | pub struct ModuleItemNode(SyntaxNode); | 1606 | pub struct ModuleItemNode(SyntaxNode); |
1607 | 1607 | ||
1608 | impl ModuleItemNode { | 1608 | impl ModuleItemNode { |
1609 | pub fn new(&self, ast: ModuleItem) -> ModuleItemNode { | 1609 | pub fn new(ast: ModuleItem) -> ModuleItemNode { |
1610 | let syntax = ast.syntax().owned(); | 1610 | let syntax = ast.syntax().owned(); |
1611 | ModuleItemNode(syntax) | 1611 | ModuleItemNode(syntax) |
1612 | } | 1612 | } |
@@ -1671,7 +1671,7 @@ impl<'a> ModuleItem<'a> {} | |||
1671 | pub struct NameNode(SyntaxNode); | 1671 | pub struct NameNode(SyntaxNode); |
1672 | 1672 | ||
1673 | impl NameNode { | 1673 | impl NameNode { |
1674 | pub fn new(&self, ast: Name) -> NameNode { | 1674 | pub fn new(ast: Name) -> NameNode { |
1675 | let syntax = ast.syntax().owned(); | 1675 | let syntax = ast.syntax().owned(); |
1676 | NameNode(syntax) | 1676 | NameNode(syntax) |
1677 | } | 1677 | } |
@@ -1702,7 +1702,7 @@ impl<'a> Name<'a> {} | |||
1702 | pub struct NameRefNode(SyntaxNode); | 1702 | pub struct NameRefNode(SyntaxNode); |
1703 | 1703 | ||
1704 | impl NameRefNode { | 1704 | impl NameRefNode { |
1705 | pub fn new(&self, ast: NameRef) -> NameRefNode { | 1705 | pub fn new(ast: NameRef) -> NameRefNode { |
1706 | let syntax = ast.syntax().owned(); | 1706 | let syntax = ast.syntax().owned(); |
1707 | NameRefNode(syntax) | 1707 | NameRefNode(syntax) |
1708 | } | 1708 | } |
@@ -1733,7 +1733,7 @@ impl<'a> NameRef<'a> {} | |||
1733 | pub struct NamedFieldNode(SyntaxNode); | 1733 | pub struct NamedFieldNode(SyntaxNode); |
1734 | 1734 | ||
1735 | impl NamedFieldNode { | 1735 | impl NamedFieldNode { |
1736 | pub fn new(&self, ast: NamedField) -> NamedFieldNode { | 1736 | pub fn new(ast: NamedField) -> NamedFieldNode { |
1737 | let syntax = ast.syntax().owned(); | 1737 | let syntax = ast.syntax().owned(); |
1738 | NamedFieldNode(syntax) | 1738 | NamedFieldNode(syntax) |
1739 | } | 1739 | } |
@@ -1764,7 +1764,7 @@ impl<'a> NamedField<'a> {} | |||
1764 | pub struct NamedFieldDefNode(SyntaxNode); | 1764 | pub struct NamedFieldDefNode(SyntaxNode); |
1765 | 1765 | ||
1766 | impl NamedFieldDefNode { | 1766 | impl NamedFieldDefNode { |
1767 | pub fn new(&self, ast: NamedFieldDef) -> NamedFieldDefNode { | 1767 | pub fn new(ast: NamedFieldDef) -> NamedFieldDefNode { |
1768 | let syntax = ast.syntax().owned(); | 1768 | let syntax = ast.syntax().owned(); |
1769 | NamedFieldDefNode(syntax) | 1769 | NamedFieldDefNode(syntax) |
1770 | } | 1770 | } |
@@ -1797,7 +1797,7 @@ impl<'a> NamedFieldDef<'a> {} | |||
1797 | pub struct NamedFieldListNode(SyntaxNode); | 1797 | pub struct NamedFieldListNode(SyntaxNode); |
1798 | 1798 | ||
1799 | impl NamedFieldListNode { | 1799 | impl NamedFieldListNode { |
1800 | pub fn new(&self, ast: NamedFieldList) -> NamedFieldListNode { | 1800 | pub fn new(ast: NamedFieldList) -> NamedFieldListNode { |
1801 | let syntax = ast.syntax().owned(); | 1801 | let syntax = ast.syntax().owned(); |
1802 | NamedFieldListNode(syntax) | 1802 | NamedFieldListNode(syntax) |
1803 | } | 1803 | } |
@@ -1828,7 +1828,7 @@ impl<'a> NamedFieldList<'a> {} | |||
1828 | pub struct NeverTypeNode(SyntaxNode); | 1828 | pub struct NeverTypeNode(SyntaxNode); |
1829 | 1829 | ||
1830 | impl NeverTypeNode { | 1830 | impl NeverTypeNode { |
1831 | pub fn new(&self, ast: NeverType) -> NeverTypeNode { | 1831 | pub fn new(ast: NeverType) -> NeverTypeNode { |
1832 | let syntax = ast.syntax().owned(); | 1832 | let syntax = ast.syntax().owned(); |
1833 | NeverTypeNode(syntax) | 1833 | NeverTypeNode(syntax) |
1834 | } | 1834 | } |
@@ -1859,7 +1859,7 @@ impl<'a> NeverType<'a> {} | |||
1859 | pub struct NominalDefNode(SyntaxNode); | 1859 | pub struct NominalDefNode(SyntaxNode); |
1860 | 1860 | ||
1861 | impl NominalDefNode { | 1861 | impl NominalDefNode { |
1862 | pub fn new(&self, ast: NominalDef) -> NominalDefNode { | 1862 | pub fn new(ast: NominalDef) -> NominalDefNode { |
1863 | let syntax = ast.syntax().owned(); | 1863 | let syntax = ast.syntax().owned(); |
1864 | NominalDefNode(syntax) | 1864 | NominalDefNode(syntax) |
1865 | } | 1865 | } |
@@ -1900,7 +1900,7 @@ impl<'a> NominalDef<'a> {} | |||
1900 | pub struct ParamNode(SyntaxNode); | 1900 | pub struct ParamNode(SyntaxNode); |
1901 | 1901 | ||
1902 | impl ParamNode { | 1902 | impl ParamNode { |
1903 | pub fn new(&self, ast: Param) -> ParamNode { | 1903 | pub fn new(ast: Param) -> ParamNode { |
1904 | let syntax = ast.syntax().owned(); | 1904 | let syntax = ast.syntax().owned(); |
1905 | ParamNode(syntax) | 1905 | ParamNode(syntax) |
1906 | } | 1906 | } |
@@ -1935,7 +1935,7 @@ impl<'a> Param<'a> { | |||
1935 | pub struct ParamListNode(SyntaxNode); | 1935 | pub struct ParamListNode(SyntaxNode); |
1936 | 1936 | ||
1937 | impl ParamListNode { | 1937 | impl ParamListNode { |
1938 | pub fn new(&self, ast: ParamList) -> ParamListNode { | 1938 | pub fn new(ast: ParamList) -> ParamListNode { |
1939 | let syntax = ast.syntax().owned(); | 1939 | let syntax = ast.syntax().owned(); |
1940 | ParamListNode(syntax) | 1940 | ParamListNode(syntax) |
1941 | } | 1941 | } |
@@ -1974,7 +1974,7 @@ impl<'a> ParamList<'a> { | |||
1974 | pub struct ParenExprNode(SyntaxNode); | 1974 | pub struct ParenExprNode(SyntaxNode); |
1975 | 1975 | ||
1976 | impl ParenExprNode { | 1976 | impl ParenExprNode { |
1977 | pub fn new(&self, ast: ParenExpr) -> ParenExprNode { | 1977 | pub fn new(ast: ParenExpr) -> ParenExprNode { |
1978 | let syntax = ast.syntax().owned(); | 1978 | let syntax = ast.syntax().owned(); |
1979 | ParenExprNode(syntax) | 1979 | ParenExprNode(syntax) |
1980 | } | 1980 | } |
@@ -2005,7 +2005,7 @@ impl<'a> ParenExpr<'a> {} | |||
2005 | pub struct ParenTypeNode(SyntaxNode); | 2005 | pub struct ParenTypeNode(SyntaxNode); |
2006 | 2006 | ||
2007 | impl ParenTypeNode { | 2007 | impl ParenTypeNode { |
2008 | pub fn new(&self, ast: ParenType) -> ParenTypeNode { | 2008 | pub fn new(ast: ParenType) -> ParenTypeNode { |
2009 | let syntax = ast.syntax().owned(); | 2009 | let syntax = ast.syntax().owned(); |
2010 | ParenTypeNode(syntax) | 2010 | ParenTypeNode(syntax) |
2011 | } | 2011 | } |
@@ -2036,7 +2036,7 @@ impl<'a> ParenType<'a> {} | |||
2036 | pub struct PatNode(SyntaxNode); | 2036 | pub struct PatNode(SyntaxNode); |
2037 | 2037 | ||
2038 | impl PatNode { | 2038 | impl PatNode { |
2039 | pub fn new(&self, ast: Pat) -> PatNode { | 2039 | pub fn new(ast: Pat) -> PatNode { |
2040 | let syntax = ast.syntax().owned(); | 2040 | let syntax = ast.syntax().owned(); |
2041 | PatNode(syntax) | 2041 | PatNode(syntax) |
2042 | } | 2042 | } |
@@ -2098,7 +2098,7 @@ impl<'a> Pat<'a> {} | |||
2098 | pub struct PathNode(SyntaxNode); | 2098 | pub struct PathNode(SyntaxNode); |
2099 | 2099 | ||
2100 | impl PathNode { | 2100 | impl PathNode { |
2101 | pub fn new(&self, ast: Path) -> PathNode { | 2101 | pub fn new(ast: Path) -> PathNode { |
2102 | let syntax = ast.syntax().owned(); | 2102 | let syntax = ast.syntax().owned(); |
2103 | PathNode(syntax) | 2103 | PathNode(syntax) |
2104 | } | 2104 | } |
@@ -2137,7 +2137,7 @@ impl<'a> Path<'a> { | |||
2137 | pub struct PathExprNode(SyntaxNode); | 2137 | pub struct PathExprNode(SyntaxNode); |
2138 | 2138 | ||
2139 | impl PathExprNode { | 2139 | impl PathExprNode { |
2140 | pub fn new(&self, ast: PathExpr) -> PathExprNode { | 2140 | pub fn new(ast: PathExpr) -> PathExprNode { |
2141 | let syntax = ast.syntax().owned(); | 2141 | let syntax = ast.syntax().owned(); |
2142 | PathExprNode(syntax) | 2142 | PathExprNode(syntax) |
2143 | } | 2143 | } |
@@ -2172,7 +2172,7 @@ impl<'a> PathExpr<'a> { | |||
2172 | pub struct PathPatNode(SyntaxNode); | 2172 | pub struct PathPatNode(SyntaxNode); |
2173 | 2173 | ||
2174 | impl PathPatNode { | 2174 | impl PathPatNode { |
2175 | pub fn new(&self, ast: PathPat) -> PathPatNode { | 2175 | pub fn new(ast: PathPat) -> PathPatNode { |
2176 | let syntax = ast.syntax().owned(); | 2176 | let syntax = ast.syntax().owned(); |
2177 | PathPatNode(syntax) | 2177 | PathPatNode(syntax) |
2178 | } | 2178 | } |
@@ -2203,7 +2203,7 @@ impl<'a> PathPat<'a> {} | |||
2203 | pub struct PathSegmentNode(SyntaxNode); | 2203 | pub struct PathSegmentNode(SyntaxNode); |
2204 | 2204 | ||
2205 | impl PathSegmentNode { | 2205 | impl PathSegmentNode { |
2206 | pub fn new(&self, ast: PathSegment) -> PathSegmentNode { | 2206 | pub fn new(ast: PathSegment) -> PathSegmentNode { |
2207 | let syntax = ast.syntax().owned(); | 2207 | let syntax = ast.syntax().owned(); |
2208 | PathSegmentNode(syntax) | 2208 | PathSegmentNode(syntax) |
2209 | } | 2209 | } |
@@ -2238,7 +2238,7 @@ impl<'a> PathSegment<'a> { | |||
2238 | pub struct PathTypeNode(SyntaxNode); | 2238 | pub struct PathTypeNode(SyntaxNode); |
2239 | 2239 | ||
2240 | impl PathTypeNode { | 2240 | impl PathTypeNode { |
2241 | pub fn new(&self, ast: PathType) -> PathTypeNode { | 2241 | pub fn new(ast: PathType) -> PathTypeNode { |
2242 | let syntax = ast.syntax().owned(); | 2242 | let syntax = ast.syntax().owned(); |
2243 | PathTypeNode(syntax) | 2243 | PathTypeNode(syntax) |
2244 | } | 2244 | } |
@@ -2269,7 +2269,7 @@ impl<'a> PathType<'a> {} | |||
2269 | pub struct PlaceholderPatNode(SyntaxNode); | 2269 | pub struct PlaceholderPatNode(SyntaxNode); |
2270 | 2270 | ||
2271 | impl PlaceholderPatNode { | 2271 | impl PlaceholderPatNode { |
2272 | pub fn new(&self, ast: PlaceholderPat) -> PlaceholderPatNode { | 2272 | pub fn new(ast: PlaceholderPat) -> PlaceholderPatNode { |
2273 | let syntax = ast.syntax().owned(); | 2273 | let syntax = ast.syntax().owned(); |
2274 | PlaceholderPatNode(syntax) | 2274 | PlaceholderPatNode(syntax) |
2275 | } | 2275 | } |
@@ -2300,7 +2300,7 @@ impl<'a> PlaceholderPat<'a> {} | |||
2300 | pub struct PlaceholderTypeNode(SyntaxNode); | 2300 | pub struct PlaceholderTypeNode(SyntaxNode); |
2301 | 2301 | ||
2302 | impl PlaceholderTypeNode { | 2302 | impl PlaceholderTypeNode { |
2303 | pub fn new(&self, ast: PlaceholderType) -> PlaceholderTypeNode { | 2303 | pub fn new(ast: PlaceholderType) -> PlaceholderTypeNode { |
2304 | let syntax = ast.syntax().owned(); | 2304 | let syntax = ast.syntax().owned(); |
2305 | PlaceholderTypeNode(syntax) | 2305 | PlaceholderTypeNode(syntax) |
2306 | } | 2306 | } |
@@ -2331,7 +2331,7 @@ impl<'a> PlaceholderType<'a> {} | |||
2331 | pub struct PointerTypeNode(SyntaxNode); | 2331 | pub struct PointerTypeNode(SyntaxNode); |
2332 | 2332 | ||
2333 | impl PointerTypeNode { | 2333 | impl PointerTypeNode { |
2334 | pub fn new(&self, ast: PointerType) -> PointerTypeNode { | 2334 | pub fn new(ast: PointerType) -> PointerTypeNode { |
2335 | let syntax = ast.syntax().owned(); | 2335 | let syntax = ast.syntax().owned(); |
2336 | PointerTypeNode(syntax) | 2336 | PointerTypeNode(syntax) |
2337 | } | 2337 | } |
@@ -2362,7 +2362,7 @@ impl<'a> PointerType<'a> {} | |||
2362 | pub struct PrefixExprNode(SyntaxNode); | 2362 | pub struct PrefixExprNode(SyntaxNode); |
2363 | 2363 | ||
2364 | impl PrefixExprNode { | 2364 | impl PrefixExprNode { |
2365 | pub fn new(&self, ast: PrefixExpr) -> PrefixExprNode { | 2365 | pub fn new(ast: PrefixExpr) -> PrefixExprNode { |
2366 | let syntax = ast.syntax().owned(); | 2366 | let syntax = ast.syntax().owned(); |
2367 | PrefixExprNode(syntax) | 2367 | PrefixExprNode(syntax) |
2368 | } | 2368 | } |
@@ -2393,7 +2393,7 @@ impl<'a> PrefixExpr<'a> {} | |||
2393 | pub struct RangeExprNode(SyntaxNode); | 2393 | pub struct RangeExprNode(SyntaxNode); |
2394 | 2394 | ||
2395 | impl RangeExprNode { | 2395 | impl RangeExprNode { |
2396 | pub fn new(&self, ast: RangeExpr) -> RangeExprNode { | 2396 | pub fn new(ast: RangeExpr) -> RangeExprNode { |
2397 | let syntax = ast.syntax().owned(); | 2397 | let syntax = ast.syntax().owned(); |
2398 | RangeExprNode(syntax) | 2398 | RangeExprNode(syntax) |
2399 | } | 2399 | } |
@@ -2424,7 +2424,7 @@ impl<'a> RangeExpr<'a> {} | |||
2424 | pub struct RangePatNode(SyntaxNode); | 2424 | pub struct RangePatNode(SyntaxNode); |
2425 | 2425 | ||
2426 | impl RangePatNode { | 2426 | impl RangePatNode { |
2427 | pub fn new(&self, ast: RangePat) -> RangePatNode { | 2427 | pub fn new(ast: RangePat) -> RangePatNode { |
2428 | let syntax = ast.syntax().owned(); | 2428 | let syntax = ast.syntax().owned(); |
2429 | RangePatNode(syntax) | 2429 | RangePatNode(syntax) |
2430 | } | 2430 | } |
@@ -2455,7 +2455,7 @@ impl<'a> RangePat<'a> {} | |||
2455 | pub struct RefExprNode(SyntaxNode); | 2455 | pub struct RefExprNode(SyntaxNode); |
2456 | 2456 | ||
2457 | impl RefExprNode { | 2457 | impl RefExprNode { |
2458 | pub fn new(&self, ast: RefExpr) -> RefExprNode { | 2458 | pub fn new(ast: RefExpr) -> RefExprNode { |
2459 | let syntax = ast.syntax().owned(); | 2459 | let syntax = ast.syntax().owned(); |
2460 | RefExprNode(syntax) | 2460 | RefExprNode(syntax) |
2461 | } | 2461 | } |
@@ -2486,7 +2486,7 @@ impl<'a> RefExpr<'a> {} | |||
2486 | pub struct RefPatNode(SyntaxNode); | 2486 | pub struct RefPatNode(SyntaxNode); |
2487 | 2487 | ||
2488 | impl RefPatNode { | 2488 | impl RefPatNode { |
2489 | pub fn new(&self, ast: RefPat) -> RefPatNode { | 2489 | pub fn new(ast: RefPat) -> RefPatNode { |
2490 | let syntax = ast.syntax().owned(); | 2490 | let syntax = ast.syntax().owned(); |
2491 | RefPatNode(syntax) | 2491 | RefPatNode(syntax) |
2492 | } | 2492 | } |
@@ -2517,7 +2517,7 @@ impl<'a> RefPat<'a> {} | |||
2517 | pub struct ReferenceTypeNode(SyntaxNode); | 2517 | pub struct ReferenceTypeNode(SyntaxNode); |
2518 | 2518 | ||
2519 | impl ReferenceTypeNode { | 2519 | impl ReferenceTypeNode { |
2520 | pub fn new(&self, ast: ReferenceType) -> ReferenceTypeNode { | 2520 | pub fn new(ast: ReferenceType) -> ReferenceTypeNode { |
2521 | let syntax = ast.syntax().owned(); | 2521 | let syntax = ast.syntax().owned(); |
2522 | ReferenceTypeNode(syntax) | 2522 | ReferenceTypeNode(syntax) |
2523 | } | 2523 | } |
@@ -2548,7 +2548,7 @@ impl<'a> ReferenceType<'a> {} | |||
2548 | pub struct RetTypeNode(SyntaxNode); | 2548 | pub struct RetTypeNode(SyntaxNode); |
2549 | 2549 | ||
2550 | impl RetTypeNode { | 2550 | impl RetTypeNode { |
2551 | pub fn new(&self, ast: RetType) -> RetTypeNode { | 2551 | pub fn new(ast: RetType) -> RetTypeNode { |
2552 | let syntax = ast.syntax().owned(); | 2552 | let syntax = ast.syntax().owned(); |
2553 | RetTypeNode(syntax) | 2553 | RetTypeNode(syntax) |
2554 | } | 2554 | } |
@@ -2579,7 +2579,7 @@ impl<'a> RetType<'a> {} | |||
2579 | pub struct ReturnExprNode(SyntaxNode); | 2579 | pub struct ReturnExprNode(SyntaxNode); |
2580 | 2580 | ||
2581 | impl ReturnExprNode { | 2581 | impl ReturnExprNode { |
2582 | pub fn new(&self, ast: ReturnExpr) -> ReturnExprNode { | 2582 | pub fn new(ast: ReturnExpr) -> ReturnExprNode { |
2583 | let syntax = ast.syntax().owned(); | 2583 | let syntax = ast.syntax().owned(); |
2584 | ReturnExprNode(syntax) | 2584 | ReturnExprNode(syntax) |
2585 | } | 2585 | } |
@@ -2610,7 +2610,7 @@ impl<'a> ReturnExpr<'a> {} | |||
2610 | pub struct RootNode(SyntaxNode); | 2610 | pub struct RootNode(SyntaxNode); |
2611 | 2611 | ||
2612 | impl RootNode { | 2612 | impl RootNode { |
2613 | pub fn new(&self, ast: Root) -> RootNode { | 2613 | pub fn new(ast: Root) -> RootNode { |
2614 | let syntax = ast.syntax().owned(); | 2614 | let syntax = ast.syntax().owned(); |
2615 | RootNode(syntax) | 2615 | RootNode(syntax) |
2616 | } | 2616 | } |
@@ -2647,7 +2647,7 @@ impl<'a> Root<'a> { | |||
2647 | pub struct SelfParamNode(SyntaxNode); | 2647 | pub struct SelfParamNode(SyntaxNode); |
2648 | 2648 | ||
2649 | impl SelfParamNode { | 2649 | impl SelfParamNode { |
2650 | pub fn new(&self, ast: SelfParam) -> SelfParamNode { | 2650 | pub fn new(ast: SelfParam) -> SelfParamNode { |
2651 | let syntax = ast.syntax().owned(); | 2651 | let syntax = ast.syntax().owned(); |
2652 | SelfParamNode(syntax) | 2652 | SelfParamNode(syntax) |
2653 | } | 2653 | } |
@@ -2678,7 +2678,7 @@ impl<'a> SelfParam<'a> {} | |||
2678 | pub struct SlicePatNode(SyntaxNode); | 2678 | pub struct SlicePatNode(SyntaxNode); |
2679 | 2679 | ||
2680 | impl SlicePatNode { | 2680 | impl SlicePatNode { |
2681 | pub fn new(&self, ast: SlicePat) -> SlicePatNode { | 2681 | pub fn new(ast: SlicePat) -> SlicePatNode { |
2682 | let syntax = ast.syntax().owned(); | 2682 | let syntax = ast.syntax().owned(); |
2683 | SlicePatNode(syntax) | 2683 | SlicePatNode(syntax) |
2684 | } | 2684 | } |
@@ -2709,7 +2709,7 @@ impl<'a> SlicePat<'a> {} | |||
2709 | pub struct SliceTypeNode(SyntaxNode); | 2709 | pub struct SliceTypeNode(SyntaxNode); |
2710 | 2710 | ||
2711 | impl SliceTypeNode { | 2711 | impl SliceTypeNode { |
2712 | pub fn new(&self, ast: SliceType) -> SliceTypeNode { | 2712 | pub fn new(ast: SliceType) -> SliceTypeNode { |
2713 | let syntax = ast.syntax().owned(); | 2713 | let syntax = ast.syntax().owned(); |
2714 | SliceTypeNode(syntax) | 2714 | SliceTypeNode(syntax) |
2715 | } | 2715 | } |
@@ -2740,7 +2740,7 @@ impl<'a> SliceType<'a> {} | |||
2740 | pub struct StaticDefNode(SyntaxNode); | 2740 | pub struct StaticDefNode(SyntaxNode); |
2741 | 2741 | ||
2742 | impl StaticDefNode { | 2742 | impl StaticDefNode { |
2743 | pub fn new(&self, ast: StaticDef) -> StaticDefNode { | 2743 | pub fn new(ast: StaticDef) -> StaticDefNode { |
2744 | let syntax = ast.syntax().owned(); | 2744 | let syntax = ast.syntax().owned(); |
2745 | StaticDefNode(syntax) | 2745 | StaticDefNode(syntax) |
2746 | } | 2746 | } |
@@ -2774,7 +2774,7 @@ impl<'a> StaticDef<'a> {} | |||
2774 | pub struct StmtNode(SyntaxNode); | 2774 | pub struct StmtNode(SyntaxNode); |
2775 | 2775 | ||
2776 | impl StmtNode { | 2776 | impl StmtNode { |
2777 | pub fn new(&self, ast: Stmt) -> StmtNode { | 2777 | pub fn new(ast: Stmt) -> StmtNode { |
2778 | let syntax = ast.syntax().owned(); | 2778 | let syntax = ast.syntax().owned(); |
2779 | StmtNode(syntax) | 2779 | StmtNode(syntax) |
2780 | } | 2780 | } |
@@ -2812,7 +2812,7 @@ impl<'a> Stmt<'a> {} | |||
2812 | pub struct StructDefNode(SyntaxNode); | 2812 | pub struct StructDefNode(SyntaxNode); |
2813 | 2813 | ||
2814 | impl StructDefNode { | 2814 | impl StructDefNode { |
2815 | pub fn new(&self, ast: StructDef) -> StructDefNode { | 2815 | pub fn new(ast: StructDef) -> StructDefNode { |
2816 | let syntax = ast.syntax().owned(); | 2816 | let syntax = ast.syntax().owned(); |
2817 | StructDefNode(syntax) | 2817 | StructDefNode(syntax) |
2818 | } | 2818 | } |
@@ -2850,7 +2850,7 @@ impl<'a> StructDef<'a> { | |||
2850 | pub struct StructLitNode(SyntaxNode); | 2850 | pub struct StructLitNode(SyntaxNode); |
2851 | 2851 | ||
2852 | impl StructLitNode { | 2852 | impl StructLitNode { |
2853 | pub fn new(&self, ast: StructLit) -> StructLitNode { | 2853 | pub fn new(ast: StructLit) -> StructLitNode { |
2854 | let syntax = ast.syntax().owned(); | 2854 | let syntax = ast.syntax().owned(); |
2855 | StructLitNode(syntax) | 2855 | StructLitNode(syntax) |
2856 | } | 2856 | } |
@@ -2881,7 +2881,7 @@ impl<'a> StructLit<'a> {} | |||
2881 | pub struct StructPatNode(SyntaxNode); | 2881 | pub struct StructPatNode(SyntaxNode); |
2882 | 2882 | ||
2883 | impl StructPatNode { | 2883 | impl StructPatNode { |
2884 | pub fn new(&self, ast: StructPat) -> StructPatNode { | 2884 | pub fn new(ast: StructPat) -> StructPatNode { |
2885 | let syntax = ast.syntax().owned(); | 2885 | let syntax = ast.syntax().owned(); |
2886 | StructPatNode(syntax) | 2886 | StructPatNode(syntax) |
2887 | } | 2887 | } |
@@ -2912,7 +2912,7 @@ impl<'a> StructPat<'a> {} | |||
2912 | pub struct TokenTreeNode(SyntaxNode); | 2912 | pub struct TokenTreeNode(SyntaxNode); |
2913 | 2913 | ||
2914 | impl TokenTreeNode { | 2914 | impl TokenTreeNode { |
2915 | pub fn new(&self, ast: TokenTree) -> TokenTreeNode { | 2915 | pub fn new(ast: TokenTree) -> TokenTreeNode { |
2916 | let syntax = ast.syntax().owned(); | 2916 | let syntax = ast.syntax().owned(); |
2917 | TokenTreeNode(syntax) | 2917 | TokenTreeNode(syntax) |
2918 | } | 2918 | } |
@@ -2943,7 +2943,7 @@ impl<'a> TokenTree<'a> {} | |||
2943 | pub struct TraitDefNode(SyntaxNode); | 2943 | pub struct TraitDefNode(SyntaxNode); |
2944 | 2944 | ||
2945 | impl TraitDefNode { | 2945 | impl TraitDefNode { |
2946 | pub fn new(&self, ast: TraitDef) -> TraitDefNode { | 2946 | pub fn new(ast: TraitDef) -> TraitDefNode { |
2947 | let syntax = ast.syntax().owned(); | 2947 | let syntax = ast.syntax().owned(); |
2948 | TraitDefNode(syntax) | 2948 | TraitDefNode(syntax) |
2949 | } | 2949 | } |
@@ -2976,7 +2976,7 @@ impl<'a> TraitDef<'a> {} | |||
2976 | pub struct TryExprNode(SyntaxNode); | 2976 | pub struct TryExprNode(SyntaxNode); |
2977 | 2977 | ||
2978 | impl TryExprNode { | 2978 | impl TryExprNode { |
2979 | pub fn new(&self, ast: TryExpr) -> TryExprNode { | 2979 | pub fn new(ast: TryExpr) -> TryExprNode { |
2980 | let syntax = ast.syntax().owned(); | 2980 | let syntax = ast.syntax().owned(); |
2981 | TryExprNode(syntax) | 2981 | TryExprNode(syntax) |
2982 | } | 2982 | } |
@@ -3007,7 +3007,7 @@ impl<'a> TryExpr<'a> {} | |||
3007 | pub struct TupleExprNode(SyntaxNode); | 3007 | pub struct TupleExprNode(SyntaxNode); |
3008 | 3008 | ||
3009 | impl TupleExprNode { | 3009 | impl TupleExprNode { |
3010 | pub fn new(&self, ast: TupleExpr) -> TupleExprNode { | 3010 | pub fn new(ast: TupleExpr) -> TupleExprNode { |
3011 | let syntax = ast.syntax().owned(); | 3011 | let syntax = ast.syntax().owned(); |
3012 | TupleExprNode(syntax) | 3012 | TupleExprNode(syntax) |
3013 | } | 3013 | } |
@@ -3038,7 +3038,7 @@ impl<'a> TupleExpr<'a> {} | |||
3038 | pub struct TuplePatNode(SyntaxNode); | 3038 | pub struct TuplePatNode(SyntaxNode); |
3039 | 3039 | ||
3040 | impl TuplePatNode { | 3040 | impl TuplePatNode { |
3041 | pub fn new(&self, ast: TuplePat) -> TuplePatNode { | 3041 | pub fn new(ast: TuplePat) -> TuplePatNode { |
3042 | let syntax = ast.syntax().owned(); | 3042 | let syntax = ast.syntax().owned(); |
3043 | TuplePatNode(syntax) | 3043 | TuplePatNode(syntax) |
3044 | } | 3044 | } |
@@ -3069,7 +3069,7 @@ impl<'a> TuplePat<'a> {} | |||
3069 | pub struct TupleStructPatNode(SyntaxNode); | 3069 | pub struct TupleStructPatNode(SyntaxNode); |
3070 | 3070 | ||
3071 | impl TupleStructPatNode { | 3071 | impl TupleStructPatNode { |
3072 | pub fn new(&self, ast: TupleStructPat) -> TupleStructPatNode { | 3072 | pub fn new(ast: TupleStructPat) -> TupleStructPatNode { |
3073 | let syntax = ast.syntax().owned(); | 3073 | let syntax = ast.syntax().owned(); |
3074 | TupleStructPatNode(syntax) | 3074 | TupleStructPatNode(syntax) |
3075 | } | 3075 | } |
@@ -3100,7 +3100,7 @@ impl<'a> TupleStructPat<'a> {} | |||
3100 | pub struct TupleTypeNode(SyntaxNode); | 3100 | pub struct TupleTypeNode(SyntaxNode); |
3101 | 3101 | ||
3102 | impl TupleTypeNode { | 3102 | impl TupleTypeNode { |
3103 | pub fn new(&self, ast: TupleType) -> TupleTypeNode { | 3103 | pub fn new(ast: TupleType) -> TupleTypeNode { |
3104 | let syntax = ast.syntax().owned(); | 3104 | let syntax = ast.syntax().owned(); |
3105 | TupleTypeNode(syntax) | 3105 | TupleTypeNode(syntax) |
3106 | } | 3106 | } |
@@ -3131,7 +3131,7 @@ impl<'a> TupleType<'a> {} | |||
3131 | pub struct TypeDefNode(SyntaxNode); | 3131 | pub struct TypeDefNode(SyntaxNode); |
3132 | 3132 | ||
3133 | impl TypeDefNode { | 3133 | impl TypeDefNode { |
3134 | pub fn new(&self, ast: TypeDef) -> TypeDefNode { | 3134 | pub fn new(ast: TypeDef) -> TypeDefNode { |
3135 | let syntax = ast.syntax().owned(); | 3135 | let syntax = ast.syntax().owned(); |
3136 | TypeDefNode(syntax) | 3136 | TypeDefNode(syntax) |
3137 | } | 3137 | } |
@@ -3165,7 +3165,7 @@ impl<'a> TypeDef<'a> {} | |||
3165 | pub struct TypeParamNode(SyntaxNode); | 3165 | pub struct TypeParamNode(SyntaxNode); |
3166 | 3166 | ||
3167 | impl TypeParamNode { | 3167 | impl TypeParamNode { |
3168 | pub fn new(&self, ast: TypeParam) -> TypeParamNode { | 3168 | pub fn new(ast: TypeParam) -> TypeParamNode { |
3169 | let syntax = ast.syntax().owned(); | 3169 | let syntax = ast.syntax().owned(); |
3170 | TypeParamNode(syntax) | 3170 | TypeParamNode(syntax) |
3171 | } | 3171 | } |
@@ -3197,7 +3197,7 @@ impl<'a> TypeParam<'a> {} | |||
3197 | pub struct TypeParamListNode(SyntaxNode); | 3197 | pub struct TypeParamListNode(SyntaxNode); |
3198 | 3198 | ||
3199 | impl TypeParamListNode { | 3199 | impl TypeParamListNode { |
3200 | pub fn new(&self, ast: TypeParamList) -> TypeParamListNode { | 3200 | pub fn new(ast: TypeParamList) -> TypeParamListNode { |
3201 | let syntax = ast.syntax().owned(); | 3201 | let syntax = ast.syntax().owned(); |
3202 | TypeParamListNode(syntax) | 3202 | TypeParamListNode(syntax) |
3203 | } | 3203 | } |
@@ -3236,7 +3236,7 @@ impl<'a> TypeParamList<'a> { | |||
3236 | pub struct TypeRefNode(SyntaxNode); | 3236 | pub struct TypeRefNode(SyntaxNode); |
3237 | 3237 | ||
3238 | impl TypeRefNode { | 3238 | impl TypeRefNode { |
3239 | pub fn new(&self, ast: TypeRef) -> TypeRefNode { | 3239 | pub fn new(ast: TypeRef) -> TypeRefNode { |
3240 | let syntax = ast.syntax().owned(); | 3240 | let syntax = ast.syntax().owned(); |
3241 | TypeRefNode(syntax) | 3241 | TypeRefNode(syntax) |
3242 | } | 3242 | } |
@@ -3307,7 +3307,7 @@ impl<'a> TypeRef<'a> {} | |||
3307 | pub struct UseItemNode(SyntaxNode); | 3307 | pub struct UseItemNode(SyntaxNode); |
3308 | 3308 | ||
3309 | impl UseItemNode { | 3309 | impl UseItemNode { |
3310 | pub fn new(&self, ast: UseItem) -> UseItemNode { | 3310 | pub fn new(ast: UseItem) -> UseItemNode { |
3311 | let syntax = ast.syntax().owned(); | 3311 | let syntax = ast.syntax().owned(); |
3312 | UseItemNode(syntax) | 3312 | UseItemNode(syntax) |
3313 | } | 3313 | } |
@@ -3342,7 +3342,7 @@ impl<'a> UseItem<'a> { | |||
3342 | pub struct UseTreeNode(SyntaxNode); | 3342 | pub struct UseTreeNode(SyntaxNode); |
3343 | 3343 | ||
3344 | impl UseTreeNode { | 3344 | impl UseTreeNode { |
3345 | pub fn new(&self, ast: UseTree) -> UseTreeNode { | 3345 | pub fn new(ast: UseTree) -> UseTreeNode { |
3346 | let syntax = ast.syntax().owned(); | 3346 | let syntax = ast.syntax().owned(); |
3347 | UseTreeNode(syntax) | 3347 | UseTreeNode(syntax) |
3348 | } | 3348 | } |
@@ -3381,7 +3381,7 @@ impl<'a> UseTree<'a> { | |||
3381 | pub struct UseTreeListNode(SyntaxNode); | 3381 | pub struct UseTreeListNode(SyntaxNode); |
3382 | 3382 | ||
3383 | impl UseTreeListNode { | 3383 | impl UseTreeListNode { |
3384 | pub fn new(&self, ast: UseTreeList) -> UseTreeListNode { | 3384 | pub fn new(ast: UseTreeList) -> UseTreeListNode { |
3385 | let syntax = ast.syntax().owned(); | 3385 | let syntax = ast.syntax().owned(); |
3386 | UseTreeListNode(syntax) | 3386 | UseTreeListNode(syntax) |
3387 | } | 3387 | } |
@@ -3416,7 +3416,7 @@ impl<'a> UseTreeList<'a> { | |||
3416 | pub struct WhereClauseNode(SyntaxNode); | 3416 | pub struct WhereClauseNode(SyntaxNode); |
3417 | 3417 | ||
3418 | impl WhereClauseNode { | 3418 | impl WhereClauseNode { |
3419 | pub fn new(&self, ast: WhereClause) -> WhereClauseNode { | 3419 | pub fn new(ast: WhereClause) -> WhereClauseNode { |
3420 | let syntax = ast.syntax().owned(); | 3420 | let syntax = ast.syntax().owned(); |
3421 | WhereClauseNode(syntax) | 3421 | WhereClauseNode(syntax) |
3422 | } | 3422 | } |
@@ -3447,7 +3447,7 @@ impl<'a> WhereClause<'a> {} | |||
3447 | pub struct WhileExprNode(SyntaxNode); | 3447 | pub struct WhileExprNode(SyntaxNode); |
3448 | 3448 | ||
3449 | impl WhileExprNode { | 3449 | impl WhileExprNode { |
3450 | pub fn new(&self, ast: WhileExpr) -> WhileExprNode { | 3450 | pub fn new(ast: WhileExpr) -> WhileExprNode { |
3451 | let syntax = ast.syntax().owned(); | 3451 | let syntax = ast.syntax().owned(); |
3452 | WhileExprNode(syntax) | 3452 | WhileExprNode(syntax) |
3453 | } | 3453 | } |
@@ -3483,7 +3483,7 @@ impl<'a> WhileExpr<'a> { | |||
3483 | pub struct WhitespaceNode(SyntaxNode); | 3483 | pub struct WhitespaceNode(SyntaxNode); |
3484 | 3484 | ||
3485 | impl WhitespaceNode { | 3485 | impl WhitespaceNode { |
3486 | pub fn new(&self, ast: Whitespace) -> WhitespaceNode { | 3486 | pub fn new(ast: Whitespace) -> WhitespaceNode { |
3487 | let syntax = ast.syntax().owned(); | 3487 | let syntax = ast.syntax().owned(); |
3488 | WhitespaceNode(syntax) | 3488 | WhitespaceNode(syntax) |
3489 | } | 3489 | } |
diff --git a/crates/ra_syntax/src/ast/generated.rs.tera b/crates/ra_syntax/src/ast/generated.rs.tera index c61c3e80b..d30038cba 100644 --- a/crates/ra_syntax/src/ast/generated.rs.tera +++ b/crates/ra_syntax/src/ast/generated.rs.tera | |||
@@ -17,7 +17,7 @@ use crate::{ | |||
17 | pub struct {{ node }}Node(SyntaxNode); | 17 | pub struct {{ node }}Node(SyntaxNode); |
18 | 18 | ||
19 | impl {{ node }}Node { | 19 | impl {{ node }}Node { |
20 | pub fn new(&self, ast: {{ node }}) -> {{ node }}Node { | 20 | pub fn new(ast: {{ node }}) -> {{ node }}Node { |
21 | let syntax = ast.syntax().owned(); | 21 | let syntax = ast.syntax().owned(); |
22 | {{ node }}Node(syntax) | 22 | {{ node }}Node(syntax) |
23 | } | 23 | } |