mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Support if-let in scopes
This commit is contained in:
parent
c16530c988
commit
07cbb7d73d
12 changed files with 289 additions and 104 deletions
|
@ -237,11 +237,13 @@ fn for_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker {
|
|||
// test cond
|
||||
// fn foo() { if let Some(_) = None {} }
|
||||
fn cond(p: &mut Parser) {
|
||||
let m = p.start();
|
||||
if p.eat(LET_KW) {
|
||||
patterns::pattern(p);
|
||||
p.expect(EQ);
|
||||
}
|
||||
expr_no_struct(p)
|
||||
expr_no_struct(p);
|
||||
m.complete(p, CONDITION);
|
||||
}
|
||||
|
||||
// test match_expr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue