]> gcc.gnu.org Git - gcc.git/commit
Avoid parsing const unsafe/extern functions as async
authorOwen Avery <powerboat9.gamer@gmail.com>
Tue, 26 Mar 2024 19:58:48 +0000 (15:58 -0400)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Wed, 27 Mar 2024 12:38:45 +0000 (12:38 +0000)
commit01092b83913733d26f2c4d9bfdc22ff2eb0b0bbb
treee9eb1b242631c53b42de04285da7ae0edaef365b
parentfd621e11334faecd220b8d1e3e8e2fc18d55d0e7
Avoid parsing const unsafe/extern functions as async

gcc/rust/ChangeLog:

* parse/rust-parse-impl.h
(Parser::parse_vis_item):
Call parse_function instead of parse_async_item when finding
UNSAFE or EXTERN_KW during lookahead.

gcc/testsuite/ChangeLog:

* rust/compile/func-const-unsafe.rs: New test.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/parse/rust-parse-impl.h
gcc/testsuite/rust/compile/func-const-unsafe.rs [new file with mode: 0644]
This page took 0.06833 seconds and 6 git commands to generate.