mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
ide: hover omits unnamed where preds
This commit is contained in:
parent
14dff25107
commit
7cbc6ae920
2 changed files with 58 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue