mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
add test for function pointer without identifier
This commit is contained in:
parent
c8cd7a68b3
commit
d985394ce2
1 changed files with 18 additions and 0 deletions
|
@ -1346,6 +1346,24 @@ fn test_hover_function_pointer_show_types() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_hover_function_pointer_no_identifier_show_types() {
|
||||||
|
check(
|
||||||
|
r#"type foo$0 = fn(i32, _: i32) -> i32;"#,
|
||||||
|
expect![[r#"
|
||||||
|
*foo*
|
||||||
|
|
||||||
|
```rust
|
||||||
|
test
|
||||||
|
```
|
||||||
|
|
||||||
|
```rust
|
||||||
|
type foo = fn(i32, i32) -> i32
|
||||||
|
```
|
||||||
|
"#]],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_hover_trait_show_qualifiers() {
|
fn test_hover_trait_show_qualifiers() {
|
||||||
check_actions(
|
check_actions(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue