mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
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:
parent
64b1c72af2
commit
eccfa1645b
16 changed files with 20 additions and 22 deletions
|
@ -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()?),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue