diff options
Diffstat (limited to 'crates/ra_ide/src/hover.rs')
-rw-r--r-- | crates/ra_ide/src/hover.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs index ace33c079..29b16e602 100644 --- a/crates/ra_ide/src/hover.rs +++ b/crates/ra_ide/src/hover.rs | |||
@@ -754,6 +754,27 @@ fn func(foo: i32) { if true { <|>foo; }; } | |||
754 | } | 754 | } |
755 | 755 | ||
756 | #[test] | 756 | #[test] |
757 | fn test_hover_through_expr_in_macro_recursive() { | ||
758 | let hover_on = check_hover_result( | ||
759 | " | ||
760 | //- /lib.rs | ||
761 | macro_rules! id_deep { | ||
762 | ($($tt:tt)*) => { $($tt)* } | ||
763 | } | ||
764 | macro_rules! id { | ||
765 | ($($tt:tt)*) => { id_deep!($($tt)*) } | ||
766 | } | ||
767 | fn foo(bar:u32) { | ||
768 | let a = id!(ba<|>r); | ||
769 | } | ||
770 | ", | ||
771 | &["u32"], | ||
772 | ); | ||
773 | |||
774 | assert_eq!(hover_on, "bar") | ||
775 | } | ||
776 | |||
777 | #[test] | ||
757 | fn test_hover_non_ascii_space_doc() { | 778 | fn test_hover_non_ascii_space_doc() { |
758 | check_hover_result( | 779 | check_hover_result( |
759 | " | 780 | " |