feat: On assoc item name hover, render trait decl docs

This commit is contained in:
Lukas Wirth 2022-06-13 11:57:33 +02:00
parent 10e9f47dce
commit 9b9c13fc40
2 changed files with 44 additions and 1 deletions

View file

@ -4888,3 +4888,33 @@ enum Enum {
"#]],
);
}
#[test]
fn hover_trait_impl_assoc_item_def_doc_forwarding() {
check(
r#"
trait T {
/// Trait docs
fn func() {}
}
impl T for () {
fn func$0() {}
}
"#,
expect![[r#"
*func*
```rust
test
```
```rust
fn func()
```
---
Trait docs
"#]],
);
}