]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Fix expansion of macros inside modules
authorOwen Avery <powerboat9.gamer@gmail.com>
Sat, 22 Feb 2025 00:07:59 +0000 (19:07 -0500)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 24 Mar 2025 12:07:09 +0000 (13:07 +0100)
commitebc8d3c1a230b05b1cf365ca7dbec586738c38f5
tree8bbbd84ae785c89b042c7a6759793cacc4cf81d2
parent9724c8af49e642324b366c4cf62fca08304b2d96
gccrs: Fix expansion of macros inside modules

gcc/rust/ChangeLog:

* expand/rust-expand-visitor.cc
(ExpandVisitor::visit): Override DefaultASTVisitor in order to
expand a module's items, rather than directly visit them.
* expand/rust-expand-visitor.h
(ExpandVisitor::visit): Add override.

gcc/testsuite/ChangeLog:

* rust/compile/macros/mbe/macro-expand-module.rs: New test.

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