Fix broken link in intra-doc

This commit is contained in:
Daiki Ihara 2021-01-20 00:43:06 +09:00
parent 2472851ccf
commit f5b97e52c9
4 changed files with 68 additions and 3 deletions

View file

@ -1826,6 +1826,35 @@ pub struct B$0ar
"#]],
);
}
#[test]
fn test_hover_intra_link_reference_to_trait_method() {
check(
r#"
pub trait Foo {
fn buzz() -> usize;
}
/// [Foo][buzz]
///
/// [buzz]: Foo::buzz
pub struct B$0ar
"#,
expect![[r#"
*Bar*
```rust
test
```
```rust
pub struct Bar
```
---
[Foo](https://docs.rs/test/*/test/trait.Foo.html#tymethod.buzz)
"#]],
);
}
#[test]
fn test_hover_external_url() {