]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Handle attributes in expression macros
authorOwen Avery <powerboat9.gamer@gmail.com>
Sat, 12 Jul 2025 03:35:53 +0000 (23:35 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 30 Oct 2025 19:58:36 +0000 (20:58 +0100)
commit129fa6e42b69bea4b9c6cf952dcc64b4c1670afb
tree2115888f4b3615320d7b12750dab6e243871a739
parent3d0c831d9d0b3eb10678d9db58fd5b04090a2996
gccrs: Handle attributes in expression macros

gcc/rust/ChangeLog:

* expand/rust-macro-expand.cc (transcribe_expression): Parse any
outer attributes before parsing an expression.
* parse/rust-parse.h (Parser::parse_outer_attributes): Make
public.

gcc/testsuite/ChangeLog:

* rust/compile/attr-macro.rs: New test.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/expand/rust-macro-expand.cc
gcc/rust/parse/rust-parse.h
gcc/testsuite/rust/compile/attr-macro.rs [new file with mode: 0644]