]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Fix parsing of array expressions.
authorOwen Avery <powerboat9.gamer@gmail.com>
Mon, 27 Mar 2023 15:05:03 +0000 (11:05 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:28:39 +0000 (18:28 +0100)
commit7b2d86cad18998e6e14b6fa74d4a984438ab4b72
tree767078cf67d76b6cb1c725a428ad2d11a025f819
parentd1e329af3117ba191c45d15aff783fb712d5092d
gccrs: Fix parsing of array expressions.

Array expressions were being eagerly handled
outside of Pratt parsing.

gcc/rust/ChangeLog:

* parse/rust-parse-impl.h
(Parser<ManagedTokenSource>::parse_expr_without_block):
Remove direct array expression handling.

gcc/testsuite/ChangeLog:

* rust/compile/array4.rs: New test.
* rust/execute/torture/arrays.rs: New test.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/parse/rust-parse-impl.h
gcc/testsuite/rust/compile/array4.rs [new file with mode: 0644]
gcc/testsuite/rust/execute/torture/arrays.rs [new file with mode: 0644]