Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/hover.rs')
| -rw-r--r-- | crates/ide/src/hover.rs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index f9000ca000..62a322f976 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs @@ -963,7 +963,7 @@ fn main() { let foo_test = fo$0o(); } "#]], ); - // use literal `crate` in path + // Use literal `crate` in path check( r#" pub struct X; @@ -984,6 +984,28 @@ fn main() { f$0oo(); } ``` "#]], ); + + // Check `super` in path + check( + r#" +pub struct X; + +mod m { pub fn foo() -> super::X { super::X } } + +fn main() { m::f$0oo(); } + "#, + expect![[r#" + *foo* + + ```rust + test::m + ``` + + ```rust + pub fn foo() -> super::X + ``` + "#]], + ); } #[test] |