mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Fix hover range for derive inputs
This commit is contained in:
parent
7c7c4543da
commit
b363755901
2 changed files with 4 additions and 4 deletions
|
@ -155,6 +155,7 @@ pub(crate) fn hover(
|
|||
if let res@Some(_) = try_hover_for_lint(&attr, &token) {
|
||||
return res;
|
||||
} else {
|
||||
range = Some(token.text_range());
|
||||
try_resolve_derive_input_at(&sema, &attr, &token).map(Definition::Macro)
|
||||
}
|
||||
} else {
|
||||
|
@ -3906,7 +3907,7 @@ pub macro Copy {}
|
|||
struct Foo;
|
||||
"#,
|
||||
expect![[r#"
|
||||
*(Copy)*
|
||||
*Copy*
|
||||
|
||||
```rust
|
||||
test
|
||||
|
@ -3927,7 +3928,7 @@ mod foo {
|
|||
struct Foo;
|
||||
"#,
|
||||
expect![[r#"
|
||||
*(foo::Copy)*
|
||||
*Copy*
|
||||
|
||||
```rust
|
||||
test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue