mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-14 17:07:26 +00:00
fix formatting
This commit is contained in:
parent
87658c8173
commit
29951f9766
1 changed files with 2 additions and 4 deletions
|
@ -127,7 +127,7 @@ pub(crate) fn hover(
|
||||||
original_token.parent().and_then(ast::TokenTree::cast),
|
original_token.parent().and_then(ast::TokenTree::cast),
|
||||||
Some(tt) if tt.syntax().ancestors().any(|it| ast::Meta::can_cast(it.kind()))
|
Some(tt) if tt.syntax().ancestors().any(|it| ast::Meta::can_cast(it.kind()))
|
||||||
);
|
);
|
||||||
|
|
||||||
// prefer descending the same token kind in attribute expansions, in normal macros text
|
// prefer descending the same token kind in attribute expansions, in normal macros text
|
||||||
// equivalency is more important
|
// equivalency is more important
|
||||||
let descended = if in_attr {
|
let descended = if in_attr {
|
||||||
|
@ -168,9 +168,7 @@ pub(crate) fn hover(
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// try keywords
|
// try keywords
|
||||||
.or_else(|| {
|
.or_else(|| descended.iter().find_map(|token| render::keyword(sema, config, token)))
|
||||||
descended.iter().find_map(|token| render::keyword(sema, config, token))
|
|
||||||
})
|
|
||||||
// try rest item hover
|
// try rest item hover
|
||||||
.or_else(|| {
|
.or_else(|| {
|
||||||
descended.iter().find_map(|token| {
|
descended.iter().find_map(|token| {
|
||||||
|
|
Loading…
Reference in a new issue