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 | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs index 5db6fd7974..c745f86d84 100644 --- a/crates/ide/src/hover/tests.rs +++ b/crates/ide/src/hover/tests.rs @@ -341,6 +341,48 @@ fn main() { m::f$0oo(); } } #[test] +fn hover_omits_unnamed_where_preds() { + check( + r#" +pub fn foo(bar: impl T) { } + +fn main() { fo$0o(); } + "#, + expect![[r#" + *foo* + + ```rust + test + ``` + + ```rust + pub fn foo(bar: impl T) + ``` + "#]], + ); + check( + r#" +pub fn foo<V: AsRef<str>>(bar: impl T, baz: V) { } + +fn main() { fo$0o(); } + "#, + expect![[r#" + *foo* + + ```rust + test + ``` + + ```rust + pub fn foo<V>(bar: impl T, baz: V) + where + V: AsRef<str>, + ``` + "#]], + ); +} + +#[test] fn hover_shows_fn_signature_with_type_params() { check( r#" |