ide: hover omits unnamed where preds

This commit is contained in:
Jake Heinz 2021-11-20 11:30:53 +00:00
parent 14dff25107
commit 7cbc6ae920
2 changed files with 58 additions and 1 deletions

View file

@ -340,6 +340,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(