mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
fix: parse box syntax inside parentheses
This commit is contained in:
parent
d690249bc8
commit
8fe58c3598
3 changed files with 69 additions and 6 deletions
|
@ -43,6 +43,7 @@ pub(super) const ATOM_EXPR_FIRST: TokenSet =
|
|||
L_BRACK,
|
||||
PIPE,
|
||||
MOVE_KW,
|
||||
BOX_KW,
|
||||
IF_KW,
|
||||
WHILE_KW,
|
||||
MATCH_KW,
|
||||
|
@ -529,6 +530,8 @@ fn try_block_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker {
|
|||
// test box_expr
|
||||
// fn foo() {
|
||||
// let x = box 1i32;
|
||||
// let y = (box 1i32, box 2i32);
|
||||
// let z = Foo(box 1i32, box 2i32);
|
||||
// }
|
||||
fn box_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker {
|
||||
assert!(p.at(T![box]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue