diff options
Diffstat (limited to 'crates/ra_ide/src/hover.rs')
-rw-r--r-- | crates/ra_ide/src/hover.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs index cc79f1fab..5073bb1cf 100644 --- a/crates/ra_ide/src/hover.rs +++ b/crates/ra_ide/src/hover.rs | |||
@@ -156,7 +156,7 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn | |||
156 | classify_name_ref(&sema, &name_ref).map(|d| (name_ref.syntax().clone(), d)) | 156 | classify_name_ref(&sema, &name_ref).map(|d| (name_ref.syntax().clone(), d)) |
157 | }, | 157 | }, |
158 | ast::Name(name) => { | 158 | ast::Name(name) => { |
159 | classify_name(&sema, &name).map(|d| (name.syntax().clone(), d)) | 159 | classify_name(&sema, &name).map(|d| (name.syntax().clone(), d.definition())) |
160 | }, | 160 | }, |
161 | _ => None, | 161 | _ => None, |
162 | } | 162 | } |
@@ -785,13 +785,13 @@ fn func(foo: i32) { if true { <|>foo; }; } | |||
785 | fn test_hover_through_literal_string_in_builtin_macro() { | 785 | fn test_hover_through_literal_string_in_builtin_macro() { |
786 | check_hover_no_result( | 786 | check_hover_no_result( |
787 | r#" | 787 | r#" |
788 | //- /lib.rs | 788 | //- /lib.rs |
789 | #[rustc_builtin_macro] | 789 | #[rustc_builtin_macro] |
790 | macro_rules! assert { | 790 | macro_rules! assert { |
791 | ($cond:expr) => {{ /* compiler built-in */ }}; | 791 | ($cond:expr) => {{ /* compiler built-in */ }}; |
792 | ($cond:expr,) => {{ /* compiler built-in */ }}; | 792 | ($cond:expr,) => {{ /* compiler built-in */ }}; |
793 | ($cond:expr, $($arg:tt)+) => {{ /* compiler built-in */ }}; | 793 | ($cond:expr, $($arg:tt)+) => {{ /* compiler built-in */ }}; |
794 | } | 794 | } |
795 | 795 | ||
796 | fn foo() { | 796 | fn foo() { |
797 | assert!("hel<|>lo"); | 797 | assert!("hel<|>lo"); |