Saw a FIXME comment and decided to fix it.

This renames `descend_into_macros` to  `descend_into_macros_single` and `descend_into_macros_many` into `descend_into_macros`.
 However, this does not touch a function in `SemanticsImpl` of same name.
This commit is contained in:
Mirko Rainer 2021-10-12 11:52:31 -04:00
parent 64b1c72af2
commit eccfa1645b
16 changed files with 20 additions and 22 deletions

View file

@ -124,7 +124,7 @@ pub(crate) fn external_docs(
kind if kind.is_trivia() => 0,
_ => 1,
})?;
let token = sema.descend_into_macros(token);
let token = sema.descend_into_macros_single(token);
let node = token.parent()?;
let definition = match_ast! {
@ -254,7 +254,7 @@ impl DocCommentToken {
let original_start = doc_token.text_range().start();
let relative_comment_offset = offset - original_start - prefix_len;
sema.descend_into_macros_many(doc_token).into_iter().find_map(|t| {
sema.descend_into_macros(doc_token).into_iter().find_map(|t| {
let (node, descended_prefix_len) = match_ast! {
match t {
ast::Comment(comment) => (t.parent()?, TextSize::try_from(comment.prefix().len()).ok()?),