diff options
author | Daiki Ihara <[email protected]> | 2021-01-19 15:43:06 +0000 |
---|---|---|
committer | Daiki Ihara <[email protected]> | 2021-01-22 11:06:45 +0000 |
commit | f5b97e52c97fe6cc12aba3587c12e37b403deea4 (patch) | |
tree | 2d188dcac4e5164483f1c66cf1bc214b8035dc93 /crates/ide/src/hover.rs | |
parent | 2472851ccf22762065670e1cf00a9c39db869aac (diff) |
Fix broken link in intra-doc
Diffstat (limited to 'crates/ide/src/hover.rs')
-rw-r--r-- | crates/ide/src/hover.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index ec1631486..d47a4cb0f 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs | |||
@@ -1826,6 +1826,35 @@ pub struct B$0ar | |||
1826 | "#]], | 1826 | "#]], |
1827 | ); | 1827 | ); |
1828 | } | 1828 | } |
1829 | #[test] | ||
1830 | fn test_hover_intra_link_reference_to_trait_method() { | ||
1831 | check( | ||
1832 | r#" | ||
1833 | pub trait Foo { | ||
1834 | fn buzz() -> usize; | ||
1835 | } | ||
1836 | /// [Foo][buzz] | ||
1837 | /// | ||
1838 | /// [buzz]: Foo::buzz | ||
1839 | pub struct B$0ar | ||
1840 | "#, | ||
1841 | expect![[r#" | ||
1842 | *Bar* | ||
1843 | |||
1844 | ```rust | ||
1845 | test | ||
1846 | ``` | ||
1847 | |||
1848 | ```rust | ||
1849 | pub struct Bar | ||
1850 | ``` | ||
1851 | |||
1852 | --- | ||
1853 | |||
1854 | [Foo](https://docs.rs/test/*/test/trait.Foo.html#tymethod.buzz) | ||
1855 | "#]], | ||
1856 | ); | ||
1857 | } | ||
1829 | 1858 | ||
1830 | #[test] | 1859 | #[test] |
1831 | fn test_hover_external_url() { | 1860 | fn test_hover_external_url() { |