mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Add signature help for tuple struct patterns
This commit is contained in:
parent
03a6ab0b62
commit
55120b3d83
2 changed files with 213 additions and 25 deletions
|
@ -431,14 +431,15 @@ fn slice_pat(p: &mut Parser<'_>) -> CompletedMarker {
|
|||
|
||||
fn pat_list(p: &mut Parser<'_>, ket: SyntaxKind) {
|
||||
while !p.at(EOF) && !p.at(ket) {
|
||||
if !p.at_ts(PAT_TOP_FIRST) {
|
||||
p.error("expected a pattern");
|
||||
break;
|
||||
}
|
||||
|
||||
pattern_top(p);
|
||||
if !p.at(ket) {
|
||||
p.expect(T![,]);
|
||||
if !p.at(T![,]) {
|
||||
if p.at_ts(PAT_TOP_FIRST) {
|
||||
p.error(format!("expected {:?}, got {:?}", T![,], p.current()));
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
p.bump(T![,]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue