diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-24 09:27:46 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-24 09:27:46 +0100 |
commit | 25921f5a5f54a160a20effc59e7abeb8d6bb7755 (patch) | |
tree | 678c8d14ddcee8941291dcb3bde41e765ffddb69 /crates/ra_parser/src | |
parent | 3e086528efd950e3051654daf9e62f339ef4a55c (diff) | |
parent | 8fe58c359817f57ba981f02ee62244ce1954a41b (diff) |
Merge #1573
1573: fix: parse box syntax inside parentheses r=matklad a=csmoe
r? @matklad
Co-authored-by: csmoe <[email protected]>
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions/atom.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index 6bda04141..d98953a7e 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs | |||
@@ -43,6 +43,7 @@ pub(super) const ATOM_EXPR_FIRST: TokenSet = | |||
43 | L_BRACK, | 43 | L_BRACK, |
44 | PIPE, | 44 | PIPE, |
45 | MOVE_KW, | 45 | MOVE_KW, |
46 | BOX_KW, | ||
46 | IF_KW, | 47 | IF_KW, |
47 | WHILE_KW, | 48 | WHILE_KW, |
48 | MATCH_KW, | 49 | MATCH_KW, |
@@ -529,6 +530,8 @@ fn try_block_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { | |||
529 | // test box_expr | 530 | // test box_expr |
530 | // fn foo() { | 531 | // fn foo() { |
531 | // let x = box 1i32; | 532 | // let x = box 1i32; |
533 | // let y = (box 1i32, box 2i32); | ||
534 | // let z = Foo(box 1i32, box 2i32); | ||
532 | // } | 535 | // } |
533 | fn box_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { | 536 | fn box_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { |
534 | assert!(p.at(T![box])); | 537 | assert!(p.at(T![box])); |