Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/hover/tests.rs')
| -rw-r--r-- | crates/ide/src/hover/tests.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs index c95a0e4005..8eb16aab29 100644 --- a/crates/ide/src/hover/tests.rs +++ b/crates/ide/src/hover/tests.rs @@ -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 + "#]], + ); +} |