Skip to content

Commit 3236845

Browse files
bors[bot]Veykril
andauthored
Merge #9742
9742: fix: Fix hover range for derive inputs r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <[email protected]>
2 parents bcc3241 + b363755 commit 3236845

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/ide/src/hover.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ pub(crate) fn hover(
155155
if let res@Some(_) = try_hover_for_lint(&attr, &token) {
156156
return res;
157157
} else {
158+
range = Some(token.text_range());
158159
try_resolve_derive_input_at(&sema, &attr, &token).map(Definition::Macro)
159160
}
160161
} else {
@@ -3906,7 +3907,7 @@ pub macro Copy {}
39063907
struct Foo;
39073908
"#,
39083909
expect![[r#"
3909-
*(Copy)*
3910+
*Copy*
39103911
39113912
```rust
39123913
test
@@ -3927,7 +3928,7 @@ mod foo {
39273928
struct Foo;
39283929
"#,
39293930
expect![[r#"
3930-
*(foo::Copy)*
3931+
*Copy*
39313932
39323933
```rust
39333934
test

crates/ide_assists/src/handlers/invert_if.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ use crate::{
1212
// Assist: invert_if
1313
//
1414
// This transforms if expressions of the form `if !x {A} else {B}` into `if x {B} else {A}`
15-
// This also works with `!=`. This assist can only be applied with the cursor
16-
// on `if`.
15+
// This also works with `!=`. This assist can only be applied with the cursor on `if`.
1716
//
1817
// ```
1918
// fn main() {

0 commit comments

Comments
 (0)