mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Add or- and parenthesized-patterns
This commit is contained in:
parent
1b9b13b4b4
commit
8c8d0bb34f
15 changed files with 184 additions and 46 deletions
|
@ -336,7 +336,7 @@ fn for_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker {
|
|||
fn cond(p: &mut Parser) {
|
||||
let m = p.start();
|
||||
if p.eat(T![let]) {
|
||||
patterns::pattern_list(p);
|
||||
patterns::pattern_top(p);
|
||||
p.expect(T![=]);
|
||||
}
|
||||
expr_no_struct(p);
|
||||
|
@ -430,7 +430,7 @@ fn match_arm(p: &mut Parser) -> BlockLike {
|
|||
// }
|
||||
attributes::outer_attributes(p);
|
||||
|
||||
patterns::pattern_list_r(p, TokenSet::EMPTY);
|
||||
patterns::pattern_top_r(p, TokenSet::EMPTY);
|
||||
if p.at(T![if]) {
|
||||
match_guard(p);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue