@@ -188,7 +188,7 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> {
188188 self . imp . descend_node_at_offset ( node, offset) . flatten ( ) . find_map ( N :: cast)
189189 }
190190
191- /// Find an AstNode by offset inside SyntaxNode, if it is inside an attribte macro call,
191+ /// Find an AstNode by offset inside SyntaxNode, if it is inside an attribute macro call,
192192 /// descend it and find again
193193 // FIXME: Rethink this API
194194 pub fn find_nodes_at_offset_with_descend < ' slf , N : AstNode + ' slf > (
@@ -550,7 +550,7 @@ impl<'db> SemanticsImpl<'db> {
550550 string : & ast:: String ,
551551 ) -> Option < Vec < ( TextRange , Option < PathResolution > ) > > {
552552 let quote = string. open_quote_text_range ( ) ?;
553- self . descend_into_macros_ng_b ( string. syntax ( ) . clone ( ) , |token| {
553+ self . descend_into_macros_breakable ( string. syntax ( ) . clone ( ) , |token| {
554554 ( || {
555555 let token = token. value ;
556556 let string = ast:: String :: cast ( token) ?;
@@ -577,7 +577,7 @@ impl<'db> SemanticsImpl<'db> {
577577 ) -> Option < ( TextRange , Option < PathResolution > ) > {
578578 let original_string = ast:: String :: cast ( original_token. clone ( ) ) ?;
579579 let quote = original_string. open_quote_text_range ( ) ?;
580- self . descend_into_macros_ng_b ( original_token. clone ( ) , |token| {
580+ self . descend_into_macros_breakable ( original_token. clone ( ) , |token| {
581581 ( || {
582582 let token = token. value ;
583583 self . resolve_offset_in_format_args (
@@ -664,7 +664,7 @@ impl<'db> SemanticsImpl<'db> {
664664 res
665665 }
666666
667- pub fn descend_into_macros_ng (
667+ pub fn descend_into_macros_cb (
668668 & self ,
669669 token : SyntaxToken ,
670670 mut cb : impl FnMut ( InFile < SyntaxToken > ) ,
@@ -675,7 +675,7 @@ impl<'db> SemanticsImpl<'db> {
675675 } ) ;
676676 }
677677
678- pub fn descend_into_macros_ng_v ( & self , token : SyntaxToken ) -> SmallVec < [ SyntaxToken ; 1 ] > {
678+ pub fn descend_into_macros ( & self , token : SyntaxToken ) -> SmallVec < [ SyntaxToken ; 1 ] > {
679679 let mut res = smallvec ! [ ] ;
680680 self . descend_into_macros_impl ( token. clone ( ) , & mut |t| {
681681 res. push ( t. value ) ;
@@ -687,7 +687,7 @@ impl<'db> SemanticsImpl<'db> {
687687 res
688688 }
689689
690- pub fn descend_into_macros_ng_b < T > (
690+ pub fn descend_into_macros_breakable < T > (
691691 & self ,
692692 token : SyntaxToken ,
693693 mut cb : impl FnMut ( InFile < SyntaxToken > ) -> ControlFlow < T > ,
@@ -702,7 +702,7 @@ impl<'db> SemanticsImpl<'db> {
702702 let text = token. text ( ) ;
703703 let kind = token. kind ( ) ;
704704
705- self . descend_into_macros_ng ( token. clone ( ) , |InFile { value, file_id : _ } | {
705+ self . descend_into_macros_cb ( token. clone ( ) , |InFile { value, file_id : _ } | {
706706 let mapped_kind = value. kind ( ) ;
707707 let any_ident_match = || kind. is_any_identifier ( ) && value. kind ( ) . is_any_identifier ( ) ;
708708 let matches = ( kind == mapped_kind || any_ident_match ( ) ) && text == value. text ( ) ;
@@ -722,7 +722,7 @@ impl<'db> SemanticsImpl<'db> {
722722 let text = token. text ( ) ;
723723 let kind = token. kind ( ) ;
724724
725- self . descend_into_macros_ng_b ( token. clone ( ) , |InFile { value, file_id : _ } | {
725+ self . descend_into_macros_breakable ( token. clone ( ) , |InFile { value, file_id : _ } | {
726726 let mapped_kind = value. kind ( ) ;
727727 let any_ident_match = || kind. is_any_identifier ( ) && value. kind ( ) . is_any_identifier ( ) ;
728728 let matches = ( kind == mapped_kind || any_ident_match ( ) ) && text == value. text ( ) ;
0 commit comments