diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-28 15:56:07 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-28 15:56:07 +0000 |
commit | c692e07b4ff648fea742c53c0dbad57d6f652068 (patch) | |
tree | d186df8fb298272eaa4ce14d2fccc854413bc566 /crates/ra_ide/src/hover.rs | |
parent | 93f632ca4e7bb7fd54830e456d629a4948a92337 (diff) | |
parent | 56ce34c6a7ec0b4426d4cb25e10512c7efaf6f06 (diff) |
Merge #3367
3367: Fix highlighting of const patterns r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
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"); |