mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
show variadic args in hover function signature
This commit is contained in:
parent
908c17bfa6
commit
49fab593ad
2 changed files with 29 additions and 0 deletions
|
@ -1757,6 +1757,30 @@ fn foo() { let bar = Bar; bar.fo$0o(); }
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_hover_variadic_function() {
|
||||
check(
|
||||
r#"
|
||||
extern "C" {
|
||||
pub fn foo(bar: i32, ...) -> i32;
|
||||
}
|
||||
|
||||
fn main() { let foo_test = unsafe { fo$0o(1, 2, 3); } }
|
||||
"#,
|
||||
expect![[r#"
|
||||
*foo*
|
||||
|
||||
```rust
|
||||
test
|
||||
```
|
||||
|
||||
```rust
|
||||
pub unsafe fn foo(bar: i32, ...) -> i32
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_hover_trait_has_impl_action() {
|
||||
check_actions(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue