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 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs index ead4f91595..b9ae89cc18 100644 --- a/crates/ide/src/hover/tests.rs +++ b/crates/ide/src/hover/tests.rs @@ -6104,6 +6104,31 @@ pub struct Foo(i32); } #[test] +fn hover_intra_generics() { + check( + r#" +/// Doc comment for [`Foo$0<T>`] +pub struct Foo<T>(T); +"#, + expect![[r#" + *[`Foo<T>`]* + + ```rust + test + ``` + + ```rust + pub struct Foo<T>(T); + ``` + + --- + + Doc comment for [`Foo<T>`](https://docs.rs/test/*/test/struct.Foo.html) + "#]], + ); +} + +#[test] fn hover_inert_attr() { check( r#" |