From e0f02d233fa3e26e4f10bffacbaef11b6bcb0ada Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 10 Apr 2020 15:54:05 +0200 Subject: Remove dead code --- crates/ra_syntax/src/ast/generated/nodes.rs | 376 ++++++++++++++-------------- 1 file changed, 184 insertions(+), 192 deletions(-) (limited to 'crates/ra_syntax/src/ast/generated') diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index d67d733b1..65b87bb6e 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs @@ -47,17 +47,15 @@ impl ast::DocCommentsOwner for FnDef {} impl ast::AttrsOwner for FnDef {} impl FnDef { pub fn abi(&self) -> Option { support::child(&self.syntax) } - pub fn const_token(&self) -> Option { support::token2(&self.syntax, T![const]) } - pub fn default_token(&self) -> Option { - support::token2(&self.syntax, T![default]) - } - pub fn async_token(&self) -> Option { support::token2(&self.syntax, T![async]) } - pub fn unsafe_token(&self) -> Option { support::token2(&self.syntax, T![unsafe]) } - pub fn fn_token(&self) -> Option { support::token2(&self.syntax, T![fn]) } + pub fn const_token(&self) -> Option { support::token(&self.syntax, T![const]) } + pub fn default_token(&self) -> Option { support::token(&self.syntax, T![default]) } + pub fn async_token(&self) -> Option { support::token(&self.syntax, T![async]) } + pub fn unsafe_token(&self) -> Option { support::token(&self.syntax, T![unsafe]) } + pub fn fn_token(&self) -> Option { support::token(&self.syntax, T![fn]) } pub fn param_list(&self) -> Option { support::child(&self.syntax) } pub fn ret_type(&self) -> Option { support::child(&self.syntax) } pub fn body(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token2(&self.syntax, T![;]) } + pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct RetType { @@ -75,7 +73,7 @@ impl AstNode for RetType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl RetType { - pub fn thin_arrow_token(&self) -> Option { support::token2(&self.syntax, T![->]) } + pub fn thin_arrow_token(&self) -> Option { support::token(&self.syntax, T![->]) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -99,9 +97,9 @@ impl ast::TypeParamsOwner for StructDef {} impl ast::AttrsOwner for StructDef {} impl ast::DocCommentsOwner for StructDef {} impl StructDef { - pub fn struct_token(&self) -> Option { support::token2(&self.syntax, T![struct]) } + pub fn struct_token(&self) -> Option { support::token(&self.syntax, T![struct]) } pub fn field_def_list(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token2(&self.syntax, T![;]) } + pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct UnionDef { @@ -124,7 +122,7 @@ impl ast::TypeParamsOwner for UnionDef {} impl ast::AttrsOwner for UnionDef {} impl ast::DocCommentsOwner for UnionDef {} impl UnionDef { - pub fn union_token(&self) -> Option { support::token2(&self.syntax, T![union]) } + pub fn union_token(&self) -> Option { support::token(&self.syntax, T![union]) } pub fn record_field_def_list(&self) -> Option { support::child(&self.syntax) } @@ -145,9 +143,9 @@ impl AstNode for RecordFieldDefList { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl RecordFieldDefList { - pub fn l_curly_token(&self) -> Option { support::token2(&self.syntax, T!['{']) } + pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_curly_token(&self) -> Option { support::token2(&self.syntax, T!['}']) } + pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct RecordFieldDef { @@ -186,9 +184,9 @@ impl AstNode for TupleFieldDefList { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl TupleFieldDefList { - pub fn l_paren_token(&self) -> Option { support::token2(&self.syntax, T!['(']) } + pub fn l_paren_token(&self) -> Option { support::token(&self.syntax, T!['(']) } pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_paren_token(&self) -> Option { support::token2(&self.syntax, T![')']) } + pub fn r_paren_token(&self) -> Option { support::token(&self.syntax, T![')']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TupleFieldDef { @@ -231,7 +229,7 @@ impl ast::TypeParamsOwner for EnumDef {} impl ast::AttrsOwner for EnumDef {} impl ast::DocCommentsOwner for EnumDef {} impl EnumDef { - pub fn enum_token(&self) -> Option { support::token2(&self.syntax, T![enum]) } + pub fn enum_token(&self) -> Option { support::token(&self.syntax, T![enum]) } pub fn variant_list(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -250,9 +248,9 @@ impl AstNode for EnumVariantList { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl EnumVariantList { - pub fn l_curly_token(&self) -> Option { support::token2(&self.syntax, T!['{']) } + pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } pub fn variants(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_curly_token(&self) -> Option { support::token2(&self.syntax, T!['}']) } + pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct EnumVariant { @@ -275,7 +273,7 @@ impl ast::DocCommentsOwner for EnumVariant {} impl ast::AttrsOwner for EnumVariant {} impl EnumVariant { pub fn field_def_list(&self) -> Option { support::child(&self.syntax) } - pub fn eq_token(&self) -> Option { support::token2(&self.syntax, T![=]) } + pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } pub fn expr(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -300,9 +298,9 @@ impl ast::DocCommentsOwner for TraitDef {} impl ast::TypeParamsOwner for TraitDef {} impl ast::TypeBoundsOwner for TraitDef {} impl TraitDef { - pub fn unsafe_token(&self) -> Option { support::token2(&self.syntax, T![unsafe]) } - pub fn auto_token(&self) -> Option { support::token2(&self.syntax, T![auto]) } - pub fn trait_token(&self) -> Option { support::token2(&self.syntax, T![trait]) } + pub fn unsafe_token(&self) -> Option { support::token(&self.syntax, T![unsafe]) } + pub fn auto_token(&self) -> Option { support::token(&self.syntax, T![auto]) } + pub fn trait_token(&self) -> Option { support::token(&self.syntax, T![trait]) } pub fn item_list(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -325,9 +323,9 @@ impl ast::NameOwner for Module {} impl ast::AttrsOwner for Module {} impl ast::DocCommentsOwner for Module {} impl Module { - pub fn mod_token(&self) -> Option { support::token2(&self.syntax, T![mod]) } + pub fn mod_token(&self) -> Option { support::token(&self.syntax, T![mod]) } pub fn item_list(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token2(&self.syntax, T![;]) } + pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ItemList { @@ -346,9 +344,9 @@ impl AstNode for ItemList { } impl ast::ModuleItemOwner for ItemList {} impl ItemList { - pub fn l_curly_token(&self) -> Option { support::token2(&self.syntax, T!['{']) } + pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } pub fn impl_items(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_curly_token(&self) -> Option { support::token2(&self.syntax, T!['}']) } + pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ConstDef { @@ -372,13 +370,11 @@ impl ast::AttrsOwner for ConstDef {} impl ast::DocCommentsOwner for ConstDef {} impl ast::TypeAscriptionOwner for ConstDef {} impl ConstDef { - pub fn default_token(&self) -> Option { - support::token2(&self.syntax, T![default]) - } - pub fn const_token(&self) -> Option { support::token2(&self.syntax, T![const]) } - pub fn eq_token(&self) -> Option { support::token2(&self.syntax, T![=]) } + pub fn default_token(&self) -> Option { support::token(&self.syntax, T![default]) } + pub fn const_token(&self) -> Option { support::token(&self.syntax, T![const]) } + pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } pub fn body(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token2(&self.syntax, T![;]) } + pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct StaticDef { @@ -402,11 +398,11 @@ impl ast::AttrsOwner for StaticDef {} impl ast::DocCommentsOwner for StaticDef {} impl ast::TypeAscriptionOwner for StaticDef {} impl StaticDef { - pub fn static_token(&self) -> Option { support::token2(&self.syntax, T![static]) } - pub fn mut_token(&self) -> Option { support::token2(&self.syntax, T![mut]) } - pub fn eq_token(&self) -> Option { support::token2(&self.syntax, T![=]) } + pub fn static_token(&self) -> Option { support::token(&self.syntax, T![static]) } + pub fn mut_token(&self) -> Option { support::token(&self.syntax, T![mut]) } + pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } pub fn body(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token2(&self.syntax, T![;]) } + pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TypeAliasDef { @@ -430,13 +426,11 @@ impl ast::AttrsOwner for TypeAliasDef {} impl ast::DocCommentsOwner for TypeAliasDef {} impl ast::TypeBoundsOwner for TypeAliasDef {} impl TypeAliasDef { - pub fn default_token(&self) -> Option { - support::token2(&self.syntax, T![default]) - } - pub fn type_token(&self) -> Option { support::token2(&self.syntax, T![type]) } - pub fn eq_token(&self) -> Option { support::token2(&self.syntax, T![=]) } + pub fn default_token(&self) -> Option { support::token(&self.syntax, T![default]) } + pub fn type_token(&self) -> Option { support::token(&self.syntax, T![type]) } + pub fn eq_token(&self) -> Option { support::token(&self.syntax, T![=]) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token2(&self.syntax, T![;]) } + pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ImplDef { @@ -456,14 +450,12 @@ impl AstNode for ImplDef { impl ast::TypeParamsOwner for ImplDef {} impl ast::AttrsOwner for ImplDef {} impl ImplDef { - pub fn default_token(&self) -> Option { - support::token2(&self.syntax, T![default]) - } - pub fn const_token(&self) -> Option { support::token2(&self.syntax, T![const]) } - pub fn unsafe_token(&self) -> Option { support::token2(&self.syntax, T![unsafe]) } - pub fn impl_token(&self) -> Option { support::token2(&self.syntax, T![impl]) } - pub fn excl_token(&self) -> Option { support::token2(&self.syntax, T![!]) } - pub fn for_token(&self) -> Option { support::token2(&self.syntax, T![for]) } + pub fn default_token(&self) -> Option { support::token(&self.syntax, T![default]) } + pub fn const_token(&self) -> Option { support::token(&self.syntax, T![const]) } + pub fn unsafe_token(&self) -> Option { support::token(&self.syntax, T![unsafe]) } + pub fn impl_token(&self) -> Option { support::token(&self.syntax, T![impl]) } + pub fn excl_token(&self) -> Option { support::token(&self.syntax, T![!]) } + pub fn for_token(&self) -> Option { support::token(&self.syntax, T![for]) } pub fn item_list(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -482,9 +474,9 @@ impl AstNode for ParenType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ParenType { - pub fn l_paren_token(&self) -> Option { support::token2(&self.syntax, T!['(']) } + pub fn l_paren_token(&self) -> Option { support::token(&self.syntax, T!['(']) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } - pub fn r_paren_token(&self) -> Option { support::token2(&self.syntax, T![')']) } + pub fn r_paren_token(&self) -> Option { support::token(&self.syntax, T![')']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TupleType { @@ -502,9 +494,9 @@ impl AstNode for TupleType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl TupleType { - pub fn l_paren_token(&self) -> Option { support::token2(&self.syntax, T!['(']) } + pub fn l_paren_token(&self) -> Option { support::token(&self.syntax, T!['(']) } pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_paren_token(&self) -> Option { support::token2(&self.syntax, T![')']) } + pub fn r_paren_token(&self) -> Option { support::token(&self.syntax, T![')']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct NeverType { @@ -522,7 +514,7 @@ impl AstNode for NeverType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl NeverType { - pub fn excl_token(&self) -> Option { support::token2(&self.syntax, T![!]) } + pub fn excl_token(&self) -> Option { support::token(&self.syntax, T![!]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct PathType { @@ -558,9 +550,9 @@ impl AstNode for PointerType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl PointerType { - pub fn star_token(&self) -> Option { support::token2(&self.syntax, T![*]) } - pub fn const_token(&self) -> Option { support::token2(&self.syntax, T![const]) } - pub fn mut_token(&self) -> Option { support::token2(&self.syntax, T![mut]) } + pub fn star_token(&self) -> Option { support::token(&self.syntax, T![*]) } + pub fn const_token(&self) -> Option { support::token(&self.syntax, T![const]) } + pub fn mut_token(&self) -> Option { support::token(&self.syntax, T![mut]) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -579,11 +571,11 @@ impl AstNode for ArrayType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ArrayType { - pub fn l_brack_token(&self) -> Option { support::token2(&self.syntax, T!['[']) } + pub fn l_brack_token(&self) -> Option { support::token(&self.syntax, T!['[']) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token2(&self.syntax, T![;]) } + pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } pub fn expr(&self) -> Option { support::child(&self.syntax) } - pub fn r_brack_token(&self) -> Option { support::token2(&self.syntax, T![']']) } + pub fn r_brack_token(&self) -> Option { support::token(&self.syntax, T![']']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct SliceType { @@ -601,9 +593,9 @@ impl AstNode for SliceType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl SliceType { - pub fn l_brack_token(&self) -> Option { support::token2(&self.syntax, T!['[']) } + pub fn l_brack_token(&self) -> Option { support::token(&self.syntax, T!['[']) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } - pub fn r_brack_token(&self) -> Option { support::token2(&self.syntax, T![']']) } + pub fn r_brack_token(&self) -> Option { support::token(&self.syntax, T![']']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ReferenceType { @@ -621,11 +613,11 @@ impl AstNode for ReferenceType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ReferenceType { - pub fn amp_token(&self) -> Option { support::token2(&self.syntax, T![&]) } + pub fn amp_token(&self) -> Option { support::token(&self.syntax, T![&]) } pub fn lifetime_token(&self) -> Option { - support::token2(&self.syntax, T![lifetime]) + support::token(&self.syntax, T![lifetime]) } - pub fn mut_token(&self) -> Option { support::token2(&self.syntax, T![mut]) } + pub fn mut_token(&self) -> Option { support::token(&self.syntax, T![mut]) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -644,7 +636,7 @@ impl AstNode for PlaceholderType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl PlaceholderType { - pub fn underscore_token(&self) -> Option { support::token2(&self.syntax, T![_]) } + pub fn underscore_token(&self) -> Option { support::token(&self.syntax, T![_]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct FnPointerType { @@ -663,8 +655,8 @@ impl AstNode for FnPointerType { } impl FnPointerType { pub fn abi(&self) -> Option { support::child(&self.syntax) } - pub fn unsafe_token(&self) -> Option { support::token2(&self.syntax, T![unsafe]) } - pub fn fn_token(&self) -> Option { support::token2(&self.syntax, T![fn]) } + pub fn unsafe_token(&self) -> Option { support::token(&self.syntax, T![unsafe]) } + pub fn fn_token(&self) -> Option { support::token(&self.syntax, T![fn]) } pub fn param_list(&self) -> Option { support::child(&self.syntax) } pub fn ret_type(&self) -> Option { support::child(&self.syntax) } } @@ -684,7 +676,7 @@ impl AstNode for ForType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ForType { - pub fn for_token(&self) -> Option { support::token2(&self.syntax, T![for]) } + pub fn for_token(&self) -> Option { support::token(&self.syntax, T![for]) } pub fn type_param_list(&self) -> Option { support::child(&self.syntax) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } @@ -705,7 +697,7 @@ impl AstNode for ImplTraitType { } impl ast::TypeBoundsOwner for ImplTraitType {} impl ImplTraitType { - pub fn impl_token(&self) -> Option { support::token2(&self.syntax, T![impl]) } + pub fn impl_token(&self) -> Option { support::token(&self.syntax, T![impl]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct DynTraitType { @@ -724,7 +716,7 @@ impl AstNode for DynTraitType { } impl ast::TypeBoundsOwner for DynTraitType {} impl DynTraitType { - pub fn dyn_token(&self) -> Option { support::token2(&self.syntax, T![dyn]) } + pub fn dyn_token(&self) -> Option { support::token(&self.syntax, T![dyn]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TupleExpr { @@ -743,9 +735,9 @@ impl AstNode for TupleExpr { } impl ast::AttrsOwner for TupleExpr {} impl TupleExpr { - pub fn l_paren_token(&self) -> Option { support::token2(&self.syntax, T!['(']) } + pub fn l_paren_token(&self) -> Option { support::token(&self.syntax, T!['(']) } pub fn exprs(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_paren_token(&self) -> Option { support::token2(&self.syntax, T![')']) } + pub fn r_paren_token(&self) -> Option { support::token(&self.syntax, T![')']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ArrayExpr { @@ -764,10 +756,10 @@ impl AstNode for ArrayExpr { } impl ast::AttrsOwner for ArrayExpr {} impl ArrayExpr { - pub fn l_brack_token(&self) -> Option { support::token2(&self.syntax, T!['[']) } + pub fn l_brack_token(&self) -> Option { support::token(&self.syntax, T!['[']) } pub fn exprs(&self) -> AstChildren { support::children(&self.syntax) } - pub fn semicolon_token(&self) -> Option { support::token2(&self.syntax, T![;]) } - pub fn r_brack_token(&self) -> Option { support::token2(&self.syntax, T![']']) } + pub fn semicolon_token(&self) -> Option { support::token(&self.syntax, T![;]) } + pub fn r_brack_token(&self) -> Option { support::token(&self.syntax, T![']']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ParenExpr { @@ -786,9 +778,9 @@ impl AstNode for ParenExpr { } impl ast::AttrsOwner for ParenExpr {} impl ParenExpr { - pub fn l_paren_token(&self) -> Option { support::token2(&self.syntax, T!['(']) } + pub fn l_paren_token(&self) -> Option { support::token(&self.syntax, T!['(']) } pub fn expr(&self) -> Option { support::child(&self.syntax) } - pub fn r_paren_token(&self) -> Option { support::token2(&self.syntax, T![')']) } + pub fn r_paren_token(&self) -> Option { support::token(&self.syntax, T![')']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct PathExpr { @@ -825,9 +817,9 @@ impl AstNode for LambdaExpr { } impl ast::AttrsOwner for LambdaExpr {} impl LambdaExpr { - pub fn static_token(&self) -> Option { support::token2(&self.syntax, T![static]) } - pub fn async_token(&self) -> Option { support::token2(&self.syntax, T![async]) } - pub fn move_token(&self) -> Option { support::token2(&self.syntax, T![move]) } + pub fn static_token(&self) -> Option { support::token(&self.syntax, T![static]) } + pub fn async_token(&self) -> Option { support::token(&self.syntax, T![async]) } + pub fn move_token(&self) -> Option { support::token(&self.syntax, T![move]) } pub fn param_list(&self) -> Option { support::child(&self.syntax) } pub fn ret_type(&self) -> Option { support::child(&self.syntax) } pub fn body(&self) -> Option { support::child(&self.syntax) } @@ -849,7 +841,7 @@ impl AstNode for IfExpr { } impl ast::AttrsOwner for IfExpr {} impl IfExpr { - pub fn if_token(&self) -> Option { support::token2(&self.syntax, T![if]) } + pub fn if_token(&self) -> Option { support::token(&self.syntax, T![if]) } pub fn condition(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -870,7 +862,7 @@ impl AstNode for LoopExpr { impl ast::AttrsOwner for LoopExpr {} impl ast::LoopBodyOwner for LoopExpr {} impl LoopExpr { - pub fn loop_token(&self) -> Option { support::token2(&self.syntax, T![loop]) } + pub fn loop_token(&self) -> Option { support::token(&self.syntax, T![loop]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TryBlockExpr { @@ -889,7 +881,7 @@ impl AstNode for TryBlockExpr { } impl ast::AttrsOwner for TryBlockExpr {} impl TryBlockExpr { - pub fn try_token(&self) -> Option { support::token2(&self.syntax, T![try]) } + pub fn try_token(&self) -> Option { support::token(&self.syntax, T![try]) } pub fn body(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -910,9 +902,9 @@ impl AstNode for ForExpr { impl ast::AttrsOwner for ForExpr {} impl ast::LoopBodyOwner for ForExpr {} impl ForExpr { - pub fn for_token(&self) -> Option { support::token2(&self.syntax, T![for]) } + pub fn for_token(&self) -> Option { support::token(&self.syntax, T![for]) } pub fn pat(&self) -> Option { support::child(&self.syntax) } - pub fn in_token(&self) -> Option { support::token2(&self.syntax, T![in]) } + pub fn in_token(&self) -> Option { support::token(&self.syntax, T![in]) } pub fn iterable(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -933,7 +925,7 @@ impl AstNode for WhileExpr { impl ast::AttrsOwner for WhileExpr {} impl ast::LoopBodyOwner for WhileExpr {} impl WhileExpr { - pub fn while_token(&self) -> Option { support::token2(&self.syntax, T![while]) } + pub fn while_token(&self) -> Option { support::token(&self.syntax, T![while]) } pub fn condition(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -954,10 +946,10 @@ impl AstNode for ContinueExpr { impl ast::AttrsOwner for ContinueExpr {} impl ContinueExpr { pub fn continue_token(&self) -> Option { - support::token2(&self.syntax, T![continue]) + support::token(&self.syntax, T![continue]) } pub fn lifetime_token(&self) -> Option { - support::token2(&self.syntax, T![lifetime]) + support::token(&self.syntax, T![lifetime]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -977,9 +969,9 @@ impl AstNode for BreakExpr { } impl ast::AttrsOwner for BreakExpr {} impl BreakExpr { - pub fn break_token(&self) -> Option { support::token2(&self.syntax, T![break]) } + pub fn break_token(&self) -> Option { support::token(&self.syntax, T![break]) } pub fn lifetime_token(&self) -> Option { - support::token2(&self.syntax, T![lifetime]) + support::token(&self.syntax, T![lifetime]) } pub fn expr(&self) -> Option { support::child(&self.syntax) } } @@ -1000,7 +992,7 @@ impl AstNode for Label { } impl Label { pub fn lifetime_token(&self) -> Option { - support::token2(&self.syntax, T![lifetime]) + support::token(&self.syntax, T![lifetime]) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -1021,7 +1013,7 @@ impl AstNode for BlockExpr { impl ast::AttrsOwner for BlockExpr {} impl BlockExpr { pub fn label(&self) -> Option