mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
feat: improve parser error recovery for function parameters
This commit is contained in:
parent
a2f83c956e
commit
15f11dce4a
10 changed files with 106 additions and 21 deletions
|
@ -101,6 +101,20 @@ fn baz(file$0) {}
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_param_completion_first_param() {
|
||||
check(
|
||||
r#"
|
||||
fn foo(file_id: FileId) {}
|
||||
fn bar(file_id: FileId) {}
|
||||
fn baz(file$0 id: u32) {}
|
||||
"#,
|
||||
expect![[r#"
|
||||
bn file_id: FileId
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_param_completion_nth_param() {
|
||||
check(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue