mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
feat: On assoc item name hover, render trait decl docs
This commit is contained in:
parent
10e9f47dce
commit
9b9c13fc40
2 changed files with 44 additions and 1 deletions
|
@ -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
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue