diff --git a/crates/ra_assists/src/handlers/add_explicit_type.rs b/crates/ra_assists/src/handlers/add_explicit_type.rs index d86d804b2ee..e7dcfb44e27 100644 --- a/crates/ra_assists/src/handlers/add_explicit_type.rs +++ b/crates/ra_assists/src/handlers/add_explicit_type.rs @@ -1,6 +1,6 @@ use hir::HirDisplay; use ra_syntax::{ - ast::{self, AstNode, LetStmt, NameOwner, TypeAscriptionOwner}, + ast::{self, AstNode, AstToken, LetStmt, NameOwner, TypeAscriptionOwner}, TextRange, }; @@ -35,7 +35,7 @@ pub(crate) fn add_explicit_type(ctx: AssistCtx) -> Option { let name = pat.name()?; let name_range = name.syntax().text_range(); let stmt_range = stmt.syntax().text_range(); - let eq_range = stmt.eq_token()?.text_range(); + let eq_range = stmt.eq_token()?.syntax().text_range(); // Assist should only be applicable if cursor is between 'let' and '=' let let_range = TextRange::from_to(stmt_range.start(), eq_range.start()); let cursor_in_range = ctx.frange.range.is_subrange(&let_range); diff --git a/crates/ra_assists/src/handlers/add_impl.rs b/crates/ra_assists/src/handlers/add_impl.rs index 72a201b6d2e..26dfed23767 100644 --- a/crates/ra_assists/src/handlers/add_impl.rs +++ b/crates/ra_assists/src/handlers/add_impl.rs @@ -42,7 +42,7 @@ pub(crate) fn add_impl(ctx: AssistCtx) -> Option { if let Some(type_params) = type_params { let lifetime_params = type_params .lifetime_params() - .filter_map(|it| it.lifetime()) + .filter_map(|it| it.lifetime_token()) .map(|it| it.text().clone()); let type_params = type_params.type_params().filter_map(|it| it.name()).map(|it| it.text().clone()); diff --git a/crates/ra_assists/src/handlers/add_new.rs b/crates/ra_assists/src/handlers/add_new.rs index c10397249fd..30360af9421 100644 --- a/crates/ra_assists/src/handlers/add_new.rs +++ b/crates/ra_assists/src/handlers/add_new.rs @@ -106,7 +106,7 @@ fn generate_impl_text(strukt: &ast::StructDef, code: &str) -> String { if let Some(type_params) = type_params { let lifetime_params = type_params .lifetime_params() - .filter_map(|it| it.lifetime()) + .filter_map(|it| it.lifetime_token()) .map(|it| it.text().clone()); let type_params = type_params.type_params().filter_map(|it| it.name()).map(|it| it.text().clone()); diff --git a/crates/ra_assists/src/handlers/inline_local_variable.rs b/crates/ra_assists/src/handlers/inline_local_variable.rs index 3bfcba8ff37..b9eb0967652 100644 --- a/crates/ra_assists/src/handlers/inline_local_variable.rs +++ b/crates/ra_assists/src/handlers/inline_local_variable.rs @@ -29,7 +29,7 @@ pub(crate) fn inline_local_variable(ctx: AssistCtx) -> Option { ast::Pat::BindPat(pat) => pat, _ => return None, }; - if bind_pat.is_mutable() { + if bind_pat.mut_kw_token().is_some() { tested_by!(test_not_inline_mut_variable); return None; } diff --git a/crates/ra_assists/src/handlers/introduce_variable.rs b/crates/ra_assists/src/handlers/introduce_variable.rs index 8a02f1a32c5..ab6bdf6bbdf 100644 --- a/crates/ra_assists/src/handlers/introduce_variable.rs +++ b/crates/ra_assists/src/handlers/introduce_variable.rs @@ -61,7 +61,7 @@ pub(crate) fn introduce_variable(ctx: AssistCtx) -> Option { }; if is_full_stmt { tested_by!(test_introduce_var_expr_stmt); - if !full_stmt.unwrap().has_semi() { + if full_stmt.unwrap().semi_token().is_none() { buf.push_str(";"); } edit.replace(expr.syntax().text_range(), buf); diff --git a/crates/ra_assists/src/handlers/merge_imports.rs b/crates/ra_assists/src/handlers/merge_imports.rs index f8b3ddb4e18..936d50ab49c 100644 --- a/crates/ra_assists/src/handlers/merge_imports.rs +++ b/crates/ra_assists/src/handlers/merge_imports.rs @@ -82,7 +82,7 @@ fn try_merge_trees(old: &ast::UseTree, new: &ast::UseTree) -> Option { let pattern = match &pat { ast::Pat::BindPat(bp) => { let name = bp.name().map(|nr| nr.as_name()).unwrap_or_else(Name::missing); - let annotation = BindingAnnotation::new(bp.is_mutable(), bp.is_ref()); + let annotation = BindingAnnotation::new( + bp.mut_kw_token().is_some(), + bp.ref_kw_token().is_some(), + ); let subpat = bp.pat().map(|subpat| self.collect_pat(subpat)); if annotation == BindingAnnotation::Unannotated && subpat.is_none() { // This could also be a single-segment path pattern. To @@ -613,7 +616,7 @@ impl ExprCollector<'_> { } ast::Pat::RefPat(p) => { let pat = self.collect_pat_opt(p.pat()); - let mutability = Mutability::from_mutable(p.is_mut()); + let mutability = Mutability::from_mutable(p.mut_kw_token().is_some()); Pat::Ref { pat, mutability } } ast::Pat::PathPat(p) => { diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs index 606ec48b084..689bb6c5c2f 100644 --- a/crates/ra_hir_def/src/data.rs +++ b/crates/ra_hir_def/src/data.rs @@ -75,7 +75,7 @@ impl FunctionData { TypeRef::unit() }; - let ret_type = if src.value.is_async() { + let ret_type = if src.value.async_kw_token().is_some() { let future_impl = desugar_future_path(ret_type); let ty_bound = TypeBound::Path(future_impl); TypeRef::ImplTrait(vec![ty_bound]) @@ -136,7 +136,7 @@ impl TraitData { pub(crate) fn trait_data_query(db: &dyn DefDatabase, tr: TraitId) -> Arc { let src = tr.lookup(db).source(db); let name = src.value.name().map_or_else(Name::missing, |n| n.as_name()); - let auto = src.value.is_auto(); + let auto = src.value.auto_kw_token().is_some(); let ast_id_map = db.ast_id_map(src.file_id); let container = AssocContainerId::TraitId(tr); @@ -213,7 +213,7 @@ impl ImplData { let target_trait = src.value.target_trait().map(TypeRef::from_ast); let target_type = TypeRef::from_ast_opt(src.value.target_type()); - let is_negative = src.value.is_negative(); + let is_negative = src.value.excl_token().is_some(); let module_id = impl_loc.container.module(db); let mut items = Vec::new(); diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs index b687ce2b221..d850244c4a1 100644 --- a/crates/ra_hir_def/src/generics.rs +++ b/crates/ra_hir_def/src/generics.rs @@ -194,7 +194,7 @@ impl GenericParams { } fn add_where_predicate_from_bound(&mut self, bound: ast::TypeBound, type_ref: TypeRef) { - if bound.has_question_mark() { + if bound.question_token().is_some() { // FIXME: remove this bound return; } diff --git a/crates/ra_hir_def/src/nameres/raw.rs b/crates/ra_hir_def/src/nameres/raw.rs index a9dff3a5d5a..e72ba52cfb3 100644 --- a/crates/ra_hir_def/src/nameres/raw.rs +++ b/crates/ra_hir_def/src/nameres/raw.rs @@ -287,7 +287,7 @@ impl RawItemsCollector { let visibility = RawVisibility::from_ast_with_hygiene(module.visibility(), &self.hygiene); let ast_id = self.source_ast_id_map.ast_id(&module); - if module.has_semi() { + if module.semi_token().is_some() { let item = self.raw_items.modules.alloc(ModuleData::Declaration { name, visibility, ast_id }); self.push_item(current_module, attrs, RawItemKind::Module(item)); diff --git a/crates/ra_hir_def/src/path/lower.rs b/crates/ra_hir_def/src/path/lower.rs index 3c13cb2c788..0f806d6fb50 100644 --- a/crates/ra_hir_def/src/path/lower.rs +++ b/crates/ra_hir_def/src/path/lower.rs @@ -28,7 +28,7 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option loop { let segment = path.segment()?; - if segment.coloncolon().is_some() { + if segment.coloncolon_token().is_some() { kind = PathKind::Abs; } diff --git a/crates/ra_hir_def/src/path/lower/lower_use.rs b/crates/ra_hir_def/src/path/lower/lower_use.rs index 6ec944228cf..5b6854b0f00 100644 --- a/crates/ra_hir_def/src/path/lower/lower_use.rs +++ b/crates/ra_hir_def/src/path/lower/lower_use.rs @@ -34,7 +34,7 @@ pub(crate) fn lower_use_tree( let alias = tree.alias().map(|a| { a.name().map(|it| it.as_name()).map_or(ImportAlias::Underscore, ImportAlias::Alias) }); - let is_glob = tree.star().is_some(); + let is_glob = tree.star_token().is_some(); if let Some(ast_path) = tree.path() { // Handle self in a path. // E.g. `use something::{self, <...>}` diff --git a/crates/ra_hir_def/src/type_ref.rs b/crates/ra_hir_def/src/type_ref.rs index 01cc392db02..7a833893742 100644 --- a/crates/ra_hir_def/src/type_ref.rs +++ b/crates/ra_hir_def/src/type_ref.rs @@ -77,7 +77,7 @@ impl TypeRef { } ast::TypeRef::PointerType(inner) => { let inner_ty = TypeRef::from_ast_opt(inner.type_ref()); - let mutability = Mutability::from_mutable(inner.is_mut()); + let mutability = Mutability::from_mutable(inner.mut_kw_token().is_some()); TypeRef::RawPtr(Box::new(inner_ty), mutability) } ast::TypeRef::ArrayType(inner) => { @@ -88,7 +88,7 @@ impl TypeRef { } ast::TypeRef::ReferenceType(inner) => { let inner_ty = TypeRef::from_ast_opt(inner.type_ref()); - let mutability = Mutability::from_mutable(inner.is_mut()); + let mutability = Mutability::from_mutable(inner.mut_kw_token().is_some()); TypeRef::Reference(Box::new(inner_ty), mutability) } ast::TypeRef::PlaceholderType(_inner) => TypeRef::Placeholder, diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs index ac096623682..f97e0bfebc8 100644 --- a/crates/ra_hir_ty/src/tests.rs +++ b/crates/ra_hir_ty/src/tests.rs @@ -101,7 +101,7 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String { let node = src_ptr.value.to_node(&src_ptr.file_syntax(&db)); let (range, text) = if let Some(self_param) = ast::SelfParam::cast(node.clone()) { - (self_param.self_kw().unwrap().syntax().text_range(), "self".to_string()) + (self_param.self_kw_token().unwrap().syntax().text_range(), "self".to_string()) } else { (src_ptr.value.range(), node.text().to_string().replace("\n", " ")) }; diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs index f833d2a9ade..0e34d85dbd7 100644 --- a/crates/ra_ide/src/completion/completion_context.rs +++ b/crates/ra_ide/src/completion/completion_context.rs @@ -190,7 +190,10 @@ impl<'a> CompletionContext<'a> { if let Some(name) = find_node_at_offset::(&file_with_fake_ident, offset) { if let Some(bind_pat) = name.syntax().ancestors().find_map(ast::BindPat::cast) { self.is_pat_binding_or_const = true; - if bind_pat.has_at() || bind_pat.is_ref() || bind_pat.is_mutable() { + if bind_pat.at_token().is_some() + || bind_pat.ref_kw_token().is_some() + || bind_pat.mut_kw_token().is_some() + { self.is_pat_binding_or_const = false; } if bind_pat.syntax().parent().and_then(ast::RecordFieldPatList::cast).is_some() { diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs index 746cc86ba6b..ad6fd50aa0a 100644 --- a/crates/ra_ide/src/references.rs +++ b/crates/ra_ide/src/references.rs @@ -152,7 +152,7 @@ fn decl_access(def: &Definition, syntax: &SyntaxNode, range: TextRange) -> Optio if stmt.initializer().is_some() { let pat = stmt.pat()?; if let ast::Pat::BindPat(it) = pat { - if it.is_mutable() { + if it.mut_kw_token().is_some() { return Some(ReferenceAccess::Write); } } diff --git a/crates/ra_ide/src/typing.rs b/crates/ra_ide/src/typing.rs index cb2cd2479fe..71d2bcb045d 100644 --- a/crates/ra_ide/src/typing.rs +++ b/crates/ra_ide/src/typing.rs @@ -63,7 +63,7 @@ fn on_char_typed_inner( fn on_eq_typed(file: &SourceFile, offset: TextUnit) -> Option { assert_eq!(file.syntax().text().char_at(offset), Some('=')); let let_stmt: ast::LetStmt = find_node_at_offset(file.syntax(), offset)?; - if let_stmt.has_semi() { + if let_stmt.semi_token().is_some() { return None; } if let Some(expr) = let_stmt.initializer() { diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs index a42eec91a9c..15a8279f3dc 100644 --- a/crates/ra_syntax/src/ast.rs +++ b/crates/ra_syntax/src/ast.rs @@ -287,7 +287,7 @@ where let pred = predicates.next().unwrap(); let mut bounds = pred.type_bound_list().unwrap().bounds(); - assert_eq!("'a", pred.lifetime().unwrap().text()); + assert_eq!("'a", pred.lifetime_token().unwrap().text()); assert_bound("'b", bounds.next()); assert_bound("'c", bounds.next()); diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs index d7931099535..069c6ee82a1 100644 --- a/crates/ra_syntax/src/ast/edit.rs +++ b/crates/ra_syntax/src/ast/edit.rs @@ -33,9 +33,9 @@ impl ast::FnDef { let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new(); let old_body_or_semi: SyntaxElement = if let Some(old_body) = self.body() { old_body.syntax().clone().into() - } else if let Some(semi) = self.semicolon_token() { + } else if let Some(semi) = self.semi_token() { to_insert.push(make::tokens::single_space().into()); - semi.into() + semi.syntax.clone().into() } else { to_insert.push(make::tokens::single_space().into()); to_insert.push(body.syntax().clone().into()); @@ -96,7 +96,7 @@ impl ast::ItemList { leading_indent(it.syntax()).unwrap_or_default().to_string(), InsertPosition::After(it.syntax().clone().into()), ), - None => match self.l_curly() { + None => match self.l_curly_token() { Some(it) => ( " ".to_string() + &leading_indent(self.syntax()).unwrap_or_default(), InsertPosition::After(it.syntax().clone().into()), @@ -142,7 +142,7 @@ impl ast::RecordFieldList { macro_rules! after_l_curly { () => {{ - let anchor = match self.l_curly() { + let anchor = match self.l_curly_token() { Some(it) => it.syntax().clone().into(), None => return self.clone(), }; @@ -301,7 +301,7 @@ impl ast::UseTree { suffix.clone(), self.use_tree_list(), self.alias(), - self.star().is_some(), + self.star_token().is_some(), ); let nested = make::use_tree_list(iter::once(use_tree)); return make::use_tree(prefix.clone(), Some(nested), None, false); diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs index 33fe60762a3..b50a89864ef 100644 --- a/crates/ra_syntax/src/ast/extensions.rs +++ b/crates/ra_syntax/src/ast/extensions.rs @@ -2,16 +2,14 @@ //! Extensions for various expressions live in a sibling `expr_extensions` module. use itertools::Itertools; +use ra_parser::SyntaxKind; use crate::{ ast::{ self, child_opt, children, support, AstNode, AstToken, AttrInput, NameOwner, SyntaxNode, }, - SmolStr, SyntaxElement, - SyntaxKind::*, - SyntaxToken, T, + SmolStr, SyntaxElement, SyntaxToken, T, }; -use ra_parser::SyntaxKind; impl ast::Name { pub fn text(&self) -> &SmolStr { @@ -25,13 +23,11 @@ impl ast::NameRef { } pub fn as_tuple_field(&self) -> Option { - self.syntax().children_with_tokens().find_map(|c| { - if c.kind() == SyntaxKind::INT_NUMBER { - c.as_token().and_then(|tok| tok.text().as_str().parse().ok()) - } else { - None - } - }) + if let Some(ast::NameRefToken::IntNumber(token)) = self.name_ref_token_token() { + token.text().as_str().parse().ok() + } else { + None + } } } @@ -140,15 +136,6 @@ impl ast::Path { } } -impl ast::Module { - pub fn has_semi(&self) -> bool { - match self.syntax().last_child_or_token() { - None => false, - Some(node) => node.kind() == T![;], - } - } -} - impl ast::UseTreeList { pub fn parent_use_tree(&self) -> ast::UseTree { self.syntax() @@ -179,10 +166,6 @@ impl ast::ImplDef { let second = types.next(); (first, second) } - - pub fn is_negative(&self) -> bool { - self.syntax().children_with_tokens().any(|t| t.kind() == T![!]) - } } #[derive(Debug, Clone, PartialEq, Eq)] @@ -223,41 +206,6 @@ impl ast::EnumVariant { } } -impl ast::FnDef { - pub fn semicolon_token(&self) -> Option { - self.syntax() - .last_child_or_token() - .and_then(|it| it.into_token()) - .filter(|it| it.kind() == T![;]) - } - - pub fn is_async(&self) -> bool { - self.syntax().children_with_tokens().any(|it| it.kind() == T![async]) - } -} - -impl ast::LetStmt { - pub fn has_semi(&self) -> bool { - match self.syntax().last_child_or_token() { - None => false, - Some(node) => node.kind() == T![;], - } - } - - pub fn eq_token(&self) -> Option { - self.syntax().children_with_tokens().find(|t| t.kind() == EQ).and_then(|it| it.into_token()) - } -} - -impl ast::ExprStmt { - pub fn has_semi(&self) -> bool { - match self.syntax().last_child_or_token() { - None => false, - Some(node) => node.kind() == T![;], - } - } -} - #[derive(Debug, Clone, PartialEq, Eq)] pub enum FieldKind { Name(ast::NameRef), @@ -286,25 +234,6 @@ impl ast::FieldExpr { } } -impl ast::RefPat { - pub fn is_mut(&self) -> bool { - self.syntax().children_with_tokens().any(|n| n.kind() == T![mut]) - } -} - -impl ast::BindPat { - pub fn is_mutable(&self) -> bool { - self.syntax().children_with_tokens().any(|n| n.kind() == T![mut]) - } - - pub fn is_ref(&self) -> bool { - self.syntax().children_with_tokens().any(|n| n.kind() == T![ref]) - } - pub fn has_at(&self) -> bool { - self.syntax().children_with_tokens().any(|it| it.kind() == T![@]) - } -} - pub struct SlicePatComponents { pub prefix: Vec, pub slice: Option, @@ -339,18 +268,6 @@ impl ast::SlicePat { } } -impl ast::PointerType { - pub fn is_mut(&self) -> bool { - self.syntax().children_with_tokens().any(|n| n.kind() == T![mut]) - } -} - -impl ast::ReferenceType { - pub fn is_mut(&self) -> bool { - self.syntax().children_with_tokens().any(|n| n.kind() == T![mut]) - } -} - #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] pub enum SelfParamKind { /// self @@ -363,8 +280,8 @@ pub enum SelfParamKind { impl ast::SelfParam { pub fn kind(&self) -> SelfParamKind { - if self.amp().is_some() { - if self.amp_mut_kw().is_some() { + if self.amp_token().is_some() { + if self.amp_mut_kw_token().is_some() { SelfParamKind::MutRef } else { SelfParamKind::Ref @@ -375,7 +292,7 @@ impl ast::SelfParam { } /// the "mut" in "mut self", not the one in "&mut self" - pub fn mut_kw(&self) -> Option { + pub fn mut_kw_token(&self) -> Option { self.syntax() .children_with_tokens() .filter_map(|it| it.into_token()) @@ -384,7 +301,7 @@ impl ast::SelfParam { } /// the "mut" in "&mut self", not the one in "mut self" - pub fn amp_mut_kw(&self) -> Option { + pub fn amp_mut_kw_token(&self) -> Option { self.syntax() .children_with_tokens() .filter_map(|it| it.into_token()) @@ -409,18 +326,14 @@ impl ast::TypeBound { TypeBoundKind::PathType(path_type) } else if let Some(for_type) = children(self).next() { TypeBoundKind::ForType(for_type) - } else if let Some(lifetime) = self.lifetime() { + } else if let Some(lifetime) = self.lifetime_token() { TypeBoundKind::Lifetime(lifetime) } else { unreachable!() } } - pub fn has_question_mark(&self) -> bool { - self.question().is_some() - } - - pub fn const_question(&self) -> Option { + pub fn const_question_token(&self) -> Option { self.syntax() .children_with_tokens() .filter_map(|it| it.into_token()) @@ -428,8 +341,8 @@ impl ast::TypeBound { .find_map(ast::Question::cast) } - pub fn question(&self) -> Option { - if self.const_kw().is_some() { + pub fn question_token(&self) -> Option { + if self.const_kw_token().is_some() { self.syntax() .children_with_tokens() .filter_map(|it| it.into_token()) @@ -441,12 +354,6 @@ impl ast::TypeBound { } } -impl ast::TraitDef { - pub fn is_auto(&self) -> bool { - self.syntax().children_with_tokens().any(|t| t.kind() == T![auto]) - } -} - pub enum VisibilityKind { In(ast::Path), PubCrate, @@ -459,28 +366,16 @@ impl ast::Visibility { pub fn kind(&self) -> VisibilityKind { if let Some(path) = children(self).next() { VisibilityKind::In(path) - } else if self.is_pub_crate() { + } else if self.crate_kw_token().is_some() { VisibilityKind::PubCrate - } else if self.is_pub_super() { + } else if self.super_kw_token().is_some() { VisibilityKind::PubSuper - } else if self.is_pub_self() { + } else if self.self_kw_token().is_some() { VisibilityKind::PubSuper } else { VisibilityKind::Pub } } - - fn is_pub_crate(&self) -> bool { - self.syntax().children_with_tokens().any(|it| it.kind() == T![crate]) - } - - fn is_pub_super(&self) -> bool { - self.syntax().children_with_tokens().any(|it| it.kind() == T![super]) - } - - fn is_pub_self(&self) -> bool { - self.syntax().children_with_tokens().any(|it| it.kind() == T![self]) - } } impl ast::MacroCall { diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 8b348ad6e13..bcbfd1129df 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs @@ -49,15 +49,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_kw(&self) -> Option { support::token(&self.syntax) } - pub fn default_kw(&self) -> Option { support::token(&self.syntax) } - pub fn async_kw(&self) -> Option { support::token(&self.syntax) } - pub fn unsafe_kw(&self) -> Option { support::token(&self.syntax) } - pub fn fn_kw(&self) -> Option { support::token(&self.syntax) } + pub fn const_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn default_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn async_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn unsafe_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn fn_kw_token(&self) -> Option { support::token(&self.syntax) } 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 semi(&self) -> Option { support::token(&self.syntax) } + pub fn semi_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct RetType { @@ -75,7 +75,7 @@ impl AstNode for RetType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl RetType { - pub fn thin_arrow(&self) -> Option { support::token(&self.syntax) } + pub fn thin_arrow_token(&self) -> Option { support::token(&self.syntax) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -99,9 +99,9 @@ impl ast::TypeParamsOwner for StructDef {} impl ast::AttrsOwner for StructDef {} impl ast::DocCommentsOwner for StructDef {} impl StructDef { - pub fn struct_kw(&self) -> Option { support::token(&self.syntax) } + pub fn struct_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn field_def_list(&self) -> Option { support::child(&self.syntax) } - pub fn semi(&self) -> Option { support::token(&self.syntax) } + pub fn semi_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct UnionDef { @@ -124,7 +124,7 @@ impl ast::TypeParamsOwner for UnionDef {} impl ast::AttrsOwner for UnionDef {} impl ast::DocCommentsOwner for UnionDef {} impl UnionDef { - pub fn union_kw(&self) -> Option { support::token(&self.syntax) } + pub fn union_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn record_field_def_list(&self) -> Option { support::child(&self.syntax) } @@ -145,9 +145,9 @@ impl AstNode for RecordFieldDefList { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl RecordFieldDefList { - pub fn l_curly(&self) -> Option { support::token(&self.syntax) } + pub fn l_curly_token(&self) -> Option { support::token(&self.syntax) } pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_curly(&self) -> Option { support::token(&self.syntax) } + pub fn r_curly_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct RecordFieldDef { @@ -186,9 +186,9 @@ impl AstNode for TupleFieldDefList { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl TupleFieldDefList { - pub fn l_paren(&self) -> Option { support::token(&self.syntax) } + pub fn l_paren_token(&self) -> Option { support::token(&self.syntax) } pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_paren(&self) -> Option { support::token(&self.syntax) } + pub fn r_paren_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TupleFieldDef { @@ -231,7 +231,7 @@ impl ast::TypeParamsOwner for EnumDef {} impl ast::AttrsOwner for EnumDef {} impl ast::DocCommentsOwner for EnumDef {} impl EnumDef { - pub fn enum_kw(&self) -> Option { support::token(&self.syntax) } + pub fn enum_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn variant_list(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -250,9 +250,9 @@ impl AstNode for EnumVariantList { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl EnumVariantList { - pub fn l_curly(&self) -> Option { support::token(&self.syntax) } + pub fn l_curly_token(&self) -> Option { support::token(&self.syntax) } pub fn variants(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_curly(&self) -> Option { support::token(&self.syntax) } + pub fn r_curly_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct EnumVariant { @@ -275,7 +275,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(&self) -> Option { support::token(&self.syntax) } + pub fn eq_token(&self) -> Option { support::token(&self.syntax) } pub fn expr(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -300,9 +300,9 @@ impl ast::DocCommentsOwner for TraitDef {} impl ast::TypeParamsOwner for TraitDef {} impl ast::TypeBoundsOwner for TraitDef {} impl TraitDef { - pub fn unsafe_kw(&self) -> Option { support::token(&self.syntax) } - pub fn auto_kw(&self) -> Option { support::token(&self.syntax) } - pub fn trait_kw(&self) -> Option { support::token(&self.syntax) } + pub fn unsafe_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn auto_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn trait_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn item_list(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -325,9 +325,9 @@ impl ast::NameOwner for Module {} impl ast::AttrsOwner for Module {} impl ast::DocCommentsOwner for Module {} impl Module { - pub fn mod_kw(&self) -> Option { support::token(&self.syntax) } + pub fn mod_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn item_list(&self) -> Option { support::child(&self.syntax) } - pub fn semi(&self) -> Option { support::token(&self.syntax) } + pub fn semi_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ItemList { @@ -347,9 +347,9 @@ impl AstNode for ItemList { impl ast::FnDefOwner for ItemList {} impl ast::ModuleItemOwner for ItemList {} impl ItemList { - pub fn l_curly(&self) -> Option { support::token(&self.syntax) } + pub fn l_curly_token(&self) -> Option { support::token(&self.syntax) } pub fn impl_items(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_curly(&self) -> Option { support::token(&self.syntax) } + pub fn r_curly_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ConstDef { @@ -373,11 +373,11 @@ impl ast::AttrsOwner for ConstDef {} impl ast::DocCommentsOwner for ConstDef {} impl ast::TypeAscriptionOwner for ConstDef {} impl ConstDef { - pub fn default_kw(&self) -> Option { support::token(&self.syntax) } - pub fn const_kw(&self) -> Option { support::token(&self.syntax) } - pub fn eq(&self) -> Option { support::token(&self.syntax) } + pub fn default_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn const_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn eq_token(&self) -> Option { support::token(&self.syntax) } pub fn body(&self) -> Option { support::child(&self.syntax) } - pub fn semi(&self) -> Option { support::token(&self.syntax) } + pub fn semi_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct StaticDef { @@ -401,11 +401,11 @@ impl ast::AttrsOwner for StaticDef {} impl ast::DocCommentsOwner for StaticDef {} impl ast::TypeAscriptionOwner for StaticDef {} impl StaticDef { - pub fn static_kw(&self) -> Option { support::token(&self.syntax) } - pub fn mut_kw(&self) -> Option { support::token(&self.syntax) } - pub fn eq(&self) -> Option { support::token(&self.syntax) } + pub fn static_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn mut_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn eq_token(&self) -> Option { support::token(&self.syntax) } pub fn body(&self) -> Option { support::child(&self.syntax) } - pub fn semi(&self) -> Option { support::token(&self.syntax) } + pub fn semi_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TypeAliasDef { @@ -429,11 +429,11 @@ impl ast::AttrsOwner for TypeAliasDef {} impl ast::DocCommentsOwner for TypeAliasDef {} impl ast::TypeBoundsOwner for TypeAliasDef {} impl TypeAliasDef { - pub fn default_kw(&self) -> Option { support::token(&self.syntax) } - pub fn type_kw(&self) -> Option { support::token(&self.syntax) } - pub fn eq(&self) -> Option { support::token(&self.syntax) } + pub fn default_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn type_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn eq_token(&self) -> Option { support::token(&self.syntax) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } - pub fn semi(&self) -> Option { support::token(&self.syntax) } + pub fn semi_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ImplDef { @@ -453,12 +453,12 @@ impl AstNode for ImplDef { impl ast::TypeParamsOwner for ImplDef {} impl ast::AttrsOwner for ImplDef {} impl ImplDef { - pub fn default_kw(&self) -> Option { support::token(&self.syntax) } - pub fn const_kw(&self) -> Option { support::token(&self.syntax) } - pub fn unsafe_kw(&self) -> Option { support::token(&self.syntax) } - pub fn impl_kw(&self) -> Option { support::token(&self.syntax) } - pub fn excl(&self) -> Option { support::token(&self.syntax) } - pub fn for_kw(&self) -> Option { support::token(&self.syntax) } + pub fn default_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn const_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn unsafe_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn impl_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn excl_token(&self) -> Option { support::token(&self.syntax) } + pub fn for_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn item_list(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -477,9 +477,9 @@ impl AstNode for ParenType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ParenType { - pub fn l_paren(&self) -> Option { support::token(&self.syntax) } + pub fn l_paren_token(&self) -> Option { support::token(&self.syntax) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } - pub fn r_paren(&self) -> Option { support::token(&self.syntax) } + pub fn r_paren_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TupleType { @@ -497,9 +497,9 @@ impl AstNode for TupleType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl TupleType { - pub fn l_paren(&self) -> Option { support::token(&self.syntax) } + pub fn l_paren_token(&self) -> Option { support::token(&self.syntax) } pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_paren(&self) -> Option { support::token(&self.syntax) } + pub fn r_paren_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct NeverType { @@ -517,7 +517,7 @@ impl AstNode for NeverType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl NeverType { - pub fn excl(&self) -> Option { support::token(&self.syntax) } + pub fn excl_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct PathType { @@ -553,8 +553,9 @@ impl AstNode for PointerType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl PointerType { - pub fn star(&self) -> Option { support::token(&self.syntax) } - pub fn const_kw(&self) -> Option { support::token(&self.syntax) } + pub fn star_token(&self) -> Option { support::token(&self.syntax) } + pub fn const_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn mut_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -573,11 +574,11 @@ impl AstNode for ArrayType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ArrayType { - pub fn l_brack(&self) -> Option { support::token(&self.syntax) } + pub fn l_brack_token(&self) -> Option { support::token(&self.syntax) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } - pub fn semi(&self) -> Option { support::token(&self.syntax) } + pub fn semi_token(&self) -> Option { support::token(&self.syntax) } pub fn expr(&self) -> Option { support::child(&self.syntax) } - pub fn r_brack(&self) -> Option { support::token(&self.syntax) } + pub fn r_brack_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct SliceType { @@ -595,9 +596,9 @@ impl AstNode for SliceType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl SliceType { - pub fn l_brack(&self) -> Option { support::token(&self.syntax) } + pub fn l_brack_token(&self) -> Option { support::token(&self.syntax) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } - pub fn r_brack(&self) -> Option { support::token(&self.syntax) } + pub fn r_brack_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ReferenceType { @@ -615,9 +616,9 @@ impl AstNode for ReferenceType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ReferenceType { - pub fn amp(&self) -> Option { support::token(&self.syntax) } - pub fn lifetime(&self) -> Option { support::token(&self.syntax) } - pub fn mut_kw(&self) -> Option { support::token(&self.syntax) } + pub fn amp_token(&self) -> Option { support::token(&self.syntax) } + pub fn lifetime_token(&self) -> Option { support::token(&self.syntax) } + pub fn mut_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -636,7 +637,7 @@ impl AstNode for PlaceholderType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl PlaceholderType { - pub fn underscore(&self) -> Option { support::token(&self.syntax) } + pub fn underscore_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct FnPointerType { @@ -655,8 +656,8 @@ impl AstNode for FnPointerType { } impl FnPointerType { pub fn abi(&self) -> Option { support::child(&self.syntax) } - pub fn unsafe_kw(&self) -> Option { support::token(&self.syntax) } - pub fn fn_kw(&self) -> Option { support::token(&self.syntax) } + pub fn unsafe_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn fn_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn param_list(&self) -> Option { support::child(&self.syntax) } pub fn ret_type(&self) -> Option { support::child(&self.syntax) } } @@ -676,7 +677,7 @@ impl AstNode for ForType { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ForType { - pub fn for_kw(&self) -> Option { support::token(&self.syntax) } + pub fn for_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn type_param_list(&self) -> Option { support::child(&self.syntax) } pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } @@ -697,7 +698,7 @@ impl AstNode for ImplTraitType { } impl ast::TypeBoundsOwner for ImplTraitType {} impl ImplTraitType { - pub fn impl_kw(&self) -> Option { support::token(&self.syntax) } + pub fn impl_kw_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct DynTraitType { @@ -716,7 +717,7 @@ impl AstNode for DynTraitType { } impl ast::TypeBoundsOwner for DynTraitType {} impl DynTraitType { - pub fn dyn_kw(&self) -> Option { support::token(&self.syntax) } + pub fn dyn_kw_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TupleExpr { @@ -735,9 +736,9 @@ impl AstNode for TupleExpr { } impl ast::AttrsOwner for TupleExpr {} impl TupleExpr { - pub fn l_paren(&self) -> Option { support::token(&self.syntax) } + pub fn l_paren_token(&self) -> Option { support::token(&self.syntax) } pub fn exprs(&self) -> AstChildren { support::children(&self.syntax) } - pub fn r_paren(&self) -> Option { support::token(&self.syntax) } + pub fn r_paren_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ArrayExpr { @@ -756,10 +757,10 @@ impl AstNode for ArrayExpr { } impl ast::AttrsOwner for ArrayExpr {} impl ArrayExpr { - pub fn l_brack(&self) -> Option { support::token(&self.syntax) } + pub fn l_brack_token(&self) -> Option { support::token(&self.syntax) } pub fn exprs(&self) -> AstChildren { support::children(&self.syntax) } - pub fn semi(&self) -> Option { support::token(&self.syntax) } - pub fn r_brack(&self) -> Option { support::token(&self.syntax) } + pub fn semi_token(&self) -> Option { support::token(&self.syntax) } + pub fn r_brack_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ParenExpr { @@ -778,9 +779,9 @@ impl AstNode for ParenExpr { } impl ast::AttrsOwner for ParenExpr {} impl ParenExpr { - pub fn l_paren(&self) -> Option { support::token(&self.syntax) } + pub fn l_paren_token(&self) -> Option { support::token(&self.syntax) } pub fn expr(&self) -> Option { support::child(&self.syntax) } - pub fn r_paren(&self) -> Option { support::token(&self.syntax) } + pub fn r_paren_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct PathExpr { @@ -817,9 +818,9 @@ impl AstNode for LambdaExpr { } impl ast::AttrsOwner for LambdaExpr {} impl LambdaExpr { - pub fn static_kw(&self) -> Option { support::token(&self.syntax) } - pub fn async_kw(&self) -> Option { support::token(&self.syntax) } - pub fn move_kw(&self) -> Option { support::token(&self.syntax) } + pub fn static_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn async_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn move_kw_token(&self) -> Option { support::token(&self.syntax) } 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) } @@ -841,7 +842,7 @@ impl AstNode for IfExpr { } impl ast::AttrsOwner for IfExpr {} impl IfExpr { - pub fn if_kw(&self) -> Option { support::token(&self.syntax) } + pub fn if_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn condition(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -862,7 +863,7 @@ impl AstNode for LoopExpr { impl ast::AttrsOwner for LoopExpr {} impl ast::LoopBodyOwner for LoopExpr {} impl LoopExpr { - pub fn loop_kw(&self) -> Option { support::token(&self.syntax) } + pub fn loop_kw_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TryBlockExpr { @@ -881,7 +882,7 @@ impl AstNode for TryBlockExpr { } impl ast::AttrsOwner for TryBlockExpr {} impl TryBlockExpr { - pub fn try_kw(&self) -> Option { support::token(&self.syntax) } + pub fn try_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn body(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -902,9 +903,9 @@ impl AstNode for ForExpr { impl ast::AttrsOwner for ForExpr {} impl ast::LoopBodyOwner for ForExpr {} impl ForExpr { - pub fn for_kw(&self) -> Option { support::token(&self.syntax) } + pub fn for_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn pat(&self) -> Option { support::child(&self.syntax) } - pub fn in_kw(&self) -> Option { support::token(&self.syntax) } + pub fn in_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn iterable(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -925,7 +926,7 @@ impl AstNode for WhileExpr { impl ast::AttrsOwner for WhileExpr {} impl ast::LoopBodyOwner for WhileExpr {} impl WhileExpr { - pub fn while_kw(&self) -> Option { support::token(&self.syntax) } + pub fn while_kw_token(&self) -> Option { support::token(&self.syntax) } pub fn condition(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -945,8 +946,8 @@ impl AstNode for ContinueExpr { } impl ast::AttrsOwner for ContinueExpr {} impl ContinueExpr { - pub fn continue_kw(&self) -> Option { support::token(&self.syntax) } - pub fn lifetime(&self) -> Option { support::token(&self.syntax) } + pub fn continue_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn lifetime_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct BreakExpr { @@ -965,8 +966,8 @@ impl AstNode for BreakExpr { } impl ast::AttrsOwner for BreakExpr {} impl BreakExpr { - pub fn break_kw(&self) -> Option { support::token(&self.syntax) } - pub fn lifetime(&self) -> Option { support::token(&self.syntax) } + pub fn break_kw_token(&self) -> Option { support::token(&self.syntax) } + pub fn lifetime_token(&self) -> Option { support::token(&self.syntax) } pub fn expr(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -985,7 +986,7 @@ impl AstNode for Label { fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl Label { - pub fn lifetime(&self) -> Option { support::token(&self.syntax) } + pub fn lifetime_token(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct BlockExpr { @@ -1005,7 +1006,7 @@ impl AstNode for BlockExpr { impl ast::AttrsOwner for BlockExpr {} impl BlockExpr { pub fn label(&self) -> Option