From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7905) id BEC803857702; Tue, 16 Jan 2024 18:13:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BEC803857702 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705428809; bh=8cYPOJOflC+Av/BC5qUF0ZmSQbSYgerQAv742De/HfE=; h=From:To:Subject:Date:From; b=tHmdLEIGrnnVs+zerEGXNm8ue5E7STH6SJUyW3eW+8kTxp4bW1OMOsVWMCRGpJ5ju IjYGQvtOYHrojkNtaq0BooCXrVd3+JtBiQPCywazPFhIRkJIiC+RkeBYLJ8VWluGtD 4a3QpbswSTCf0G4dhjkKIN/W7RS8Xyt/sVy991Zo= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Arthur Cohen To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-8041] gccrs: Add comma for expr delimiter to fix match arms X-Act-Checkin: gcc X-Git-Author: Pierre-Emmanuel Patry X-Git-Refname: refs/heads/trunk X-Git-Oldrev: 378c26f5a34272c7fbde0ff3c7392e6ab8240c05 X-Git-Newrev: 863431f5a0a7e208937ee471a6f0933df214cdd8 Message-Id: <20240116181329.BEC803857702@sourceware.org> Date: Tue, 16 Jan 2024 18:13:29 +0000 (GMT) List-Id: https://gcc.gnu.org/g:863431f5a0a7e208937ee471a6f0933df214cdd8 commit r14-8041-g863431f5a0a7e208937ee471a6f0933df214cdd8 Author: Pierre-Emmanuel Patry Date: Wed Oct 11 14:31:25 2023 +0200 gccrs: Add comma for expr delimiter to fix match arms Add a comma as an expr delimiter, this will allow correct parsing of match arm expressions. gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_expr): Add comma delimiter. Signed-off-by: Pierre-Emmanuel Patry Diff: --- gcc/rust/parse/rust-parse-impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 345ef0eeb6e..8c04a1af175 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -12086,7 +12086,7 @@ Parser::parse_expr (int right_binding_power, { TokenId id = current_token->get_id (); if (id == SEMICOLON || id == RIGHT_PAREN || id == RIGHT_CURLY - || id == RIGHT_SQUARE) + || id == RIGHT_SQUARE || id == COMMA) return nullptr; }