mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Implicit format args support
This commit is contained in:
parent
5b8e386bae
commit
d2cd30007c
37 changed files with 615 additions and 174 deletions
|
@ -146,7 +146,7 @@ pub(crate) fn external_docs(
|
|||
kind if kind.is_trivia() => 0,
|
||||
_ => 1,
|
||||
})?;
|
||||
let token = sema.descend_into_macros_single(DescendPreference::None, token, offset);
|
||||
let token = sema.descend_into_macros_single(DescendPreference::None, token);
|
||||
|
||||
let node = token.parent()?;
|
||||
let definition = match_ast! {
|
||||
|
@ -288,7 +288,7 @@ impl DocCommentToken {
|
|||
let original_start = doc_token.text_range().start();
|
||||
let relative_comment_offset = offset - original_start - prefix_len;
|
||||
|
||||
sema.descend_into_macros(DescendPreference::None,doc_token, offset).into_iter().find_map(|t| {
|
||||
sema.descend_into_macros(DescendPreference::None, 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