aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/hover.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/hover.rs')
-rw-r--r--crates/ide/src/hover.rs20
1 files changed, 8 insertions, 12 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index c08516805..14cf94d60 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -1821,9 +1821,10 @@ pub struct B$0ar
1821 ); 1821 );
1822 } 1822 }
1823 1823
1824 #[ignore = "path based links currently only support documentation on ModuleDef items"]
1825 #[test] 1824 #[test]
1826 fn test_hover_path_link_field() { 1825 fn test_hover_path_link_field() {
1826 // FIXME: Should be
1827 // [Foo](https://docs.rs/test/*/test/struct.Foo.html)
1827 check( 1828 check(
1828 r#" 1829 r#"
1829pub struct Foo; 1830pub struct Foo;
@@ -1845,7 +1846,7 @@ pub struct Bar {
1845 1846
1846 --- 1847 ---
1847 1848
1848 [Foo](https://docs.rs/test/*/test/struct.Foo.html) 1849 [Foo](struct.Foo.html)
1849 "#]], 1850 "#]],
1850 ); 1851 );
1851 } 1852 }
@@ -2999,29 +3000,24 @@ fn foo(ar$0g: &impl Foo + Bar<S>) {}
2999 fn test_hover_async_block_impl_trait_has_goto_type_action() { 3000 fn test_hover_async_block_impl_trait_has_goto_type_action() {
3000 check_actions( 3001 check_actions(
3001 r#" 3002 r#"
3003//- minicore: future
3002struct S; 3004struct S;
3003fn foo() { 3005fn foo() {
3004 let fo$0o = async { S }; 3006 let fo$0o = async { S };
3005} 3007}
3006
3007#[prelude_import] use future::*;
3008mod future {
3009 #[lang = "future_trait"]
3010 pub trait Future { type Output; }
3011}
3012"#, 3008"#,
3013 expect![[r#" 3009 expect![[r#"
3014 [ 3010 [
3015 GoToType( 3011 GoToType(
3016 [ 3012 [
3017 HoverGotoTypeData { 3013 HoverGotoTypeData {
3018 mod_path: "test::future::Future", 3014 mod_path: "core::future::Future",
3019 nav: NavigationTarget { 3015 nav: NavigationTarget {
3020 file_id: FileId( 3016 file_id: FileId(
3021 0, 3017 1,
3022 ), 3018 ),
3023 full_range: 101..163, 3019 full_range: 244..426,
3024 focus_range: 140..146, 3020 focus_range: 283..289,
3025 name: "Future", 3021 name: "Future",
3026 kind: Trait, 3022 kind: Trait,
3027 description: "pub trait Future", 3023 description: "pub trait Future",