Skip to content

Commit

Permalink
Merge #9742
Browse files Browse the repository at this point in the history
9742: fix: Fix hover range for derive inputs r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <[email protected]>
  • Loading branch information
bors[bot] and Veykril authored Jul 31, 2021
2 parents bcc3241 + b363755 commit 3236845
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions crates/ide/src/hover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -3906,7 +3907,7 @@ pub macro Copy {}
struct Foo;
"#,
expect![[r#"
*(Copy)*
*Copy*
```rust
test
Expand All @@ -3927,7 +3928,7 @@ mod foo {
struct Foo;
"#,
expect![[r#"
*(foo::Copy)*
*Copy*
```rust
test
Expand Down
3 changes: 1 addition & 2 deletions crates/ide_assists/src/handlers/invert_if.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ use crate::{
// Assist: invert_if
//
// This transforms if expressions of the form `if !x {A} else {B}` into `if x {B} else {A}`
// This also works with `!=`. This assist can only be applied with the cursor
// on `if`.
// This also works with `!=`. This assist can only be applied with the cursor on `if`.
//
// ```
// fn main() {
Expand Down

0 comments on commit 3236845

Please sign in to comment.