]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Added support to Parse ASYNC function
authorM V V S Manoj Kumar <mvvsmanojkumar@gmail.com>
Tue, 21 Nov 2023 16:34:24 +0000 (22:04 +0530)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 30 Jan 2024 11:36:45 +0000 (12:36 +0100)
commitd5c582396c66e9e0499ecee67129f1ff1dd55889
tree61cb49982a68cb1e2884fe1fb5676c906658d29a
parent2c843a047dd3c596b4daabe247e52e1d6475e4d6
gccrs: Added support to Parse ASYNC function

Fixes issue #2650
The parser now parses ASYNC functions. Added ASYNC case to parse_item
Added a new function parse_async_item which is called in
parse_vis_item to handle the ASYNC case. Parse_async_item
also checks the current Rust edition and generates an error if the
edition is 2015

gcc/rust/ChangeLog:

* parse/rust-parse-impl.h (Parser::parse_item): Likewise.
(Parser::parse_vis_item): Likewise.
(Parser::parse_async_item): Likewise.
* parse/rust-parse.h: Made declaration for parse_async_item.

gcc/testsuite/ChangeLog:

* rust/compile/issue-2650-1.rs: New test.(edition=2018)
* rust/compile/issue-2650-2.rs: New test.(edition=2015)

Signed-off-by: M V V S Manoj Kumar <mvvsmanojkumar@gmail.com>
gcc/rust/parse/rust-parse-impl.h
gcc/rust/parse/rust-parse.h
gcc/testsuite/rust/compile/issue-2650-1.rs [new file with mode: 0644]
gcc/testsuite/rust/compile/issue-2650-2.rs [new file with mode: 0644]