aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/hover.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs
index 7ba4bfcac..cc79f1fab 100644
--- a/crates/ra_ide/src/hover.rs
+++ b/crates/ra_ide/src/hover.rs
@@ -739,6 +739,30 @@ fn func(foo: i32) { if true { <|>foo; }; }
739 } 739 }
740 740
741 #[test] 741 #[test]
742 fn test_hover_through_func_in_macro_recursive() {
743 let hover_on = check_hover_result(
744 "
745 //- /lib.rs
746 macro_rules! id_deep {
747 ($($tt:tt)*) => { $($tt)* }
748 }
749 macro_rules! id {
750 ($($tt:tt)*) => { id_deep!($($tt)*) }
751 }
752 fn bar() -> u32 {
753 0
754 }
755 fn foo() {
756 let a = id!([0u32, bar(<|>)] );
757 }
758 ",
759 &["u32"],
760 );
761
762 assert_eq!(hover_on, "bar()")
763 }
764
765 #[test]
742 fn test_hover_through_literal_string_in_macro() { 766 fn test_hover_through_literal_string_in_macro() {
743 let hover_on = check_hover_result( 767 let hover_on = check_hover_result(
744 r#" 768 r#"