mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Recover from leading comma in tuple pat and expr
This commit is contained in:
parent
42450d2511
commit
7d1bf7023d
7 changed files with 89 additions and 4 deletions
|
@ -2003,7 +2003,10 @@ fn main() {
|
|||
let _: (&str, u32, u32)= ($0, 1, 3);
|
||||
}
|
||||
"#,
|
||||
expect![""],
|
||||
expect![[r#"
|
||||
(&str, u32)
|
||||
^^^^ ---
|
||||
"#]],
|
||||
);
|
||||
check(
|
||||
r#"
|
||||
|
@ -2011,7 +2014,10 @@ fn main() {
|
|||
let _: (&str, u32, u32, u32)= ($0, 1, 3);
|
||||
}
|
||||
"#,
|
||||
expect![""],
|
||||
expect![[r#"
|
||||
(&str, u32)
|
||||
^^^^ ---
|
||||
"#]],
|
||||
);
|
||||
check(
|
||||
r#"
|
||||
|
@ -2019,7 +2025,10 @@ fn main() {
|
|||
let _: (&str, u32, u32)= ($0, 1, 3, 5);
|
||||
}
|
||||
"#,
|
||||
expect![""],
|
||||
expect![[r#"
|
||||
(&str, u32, u32)
|
||||
^^^^ --- ---
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -2111,7 +2120,7 @@ fn main() {
|
|||
check(
|
||||
r#"
|
||||
fn main() {
|
||||
let ($0 1, 3): (i32, i32, i32);
|
||||
let ($0, 1, 3): (i32, i32, i32);
|
||||
}
|
||||
"#,
|
||||
// FIXME: tuple pat should be of size 3 ideally
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue