add test for function pointer without identifier

This commit is contained in:
Jeroen Vannevel 2022-02-15 19:20:50 +00:00
parent c8cd7a68b3
commit d985394ce2
No known key found for this signature in database
GPG Key ID: 78EF5F52F38C49BD

View File

@ -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]
fn test_hover_trait_show_qualifiers() {
check_actions(