aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/hover.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/hover.rs')
-rw-r--r--crates/ra_ide/src/hover.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs
index 06d4f1c63..befa977c7 100644
--- a/crates/ra_ide/src/hover.rs
+++ b/crates/ra_ide/src/hover.rs
@@ -921,4 +921,21 @@ fn func(foo: i32) { if true { <|>foo; }; }
921 &["unsafe trait foo"], 921 &["unsafe trait foo"],
922 ); 922 );
923 } 923 }
924
925 #[test]
926 fn test_hover_mod_with_same_name_as_function() {
927 check_hover_result(
928 "
929 //- /lib.rs
930 use self::m<|>y::Bar;
931
932 mod my {
933 pub struct Bar;
934 }
935
936 fn my() {}
937 ",
938 &["mod my"],
939 );
940 }
924} 941}