]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: respect cfg_attr expansion
authorlenny.chiadmi-delage <lenny.chiadmi-delage@epita.fr>
Fri, 19 Dec 2025 12:34:45 +0000 (12:34 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 23 Dec 2025 11:16:49 +0000 (12:16 +0100)
commita088603cbbaa2a8ffad2551ca9490045eb415e25
treea590feec29618e9f2fe4b12b1d4b5dd1a477e202
parentfe65006e77a434872ffbae3c0343dff4e7c31013
gccrs: respect cfg_attr expansion

Fix cfg_attr expansion and feature gate attribute handling

Fixes Rust-GCC#4245

gcc/rust/ChangeLog:

* checks/errors/feature/rust-feature-gate.cc (FeatureGate::visit): Added
handling for META_ITEM type attributes to properly process feature gates.
* expand/rust-cfg-strip.cc (expand_cfg_attrs): Fixed a bug where
newly inserted cfg_attr attributes wheren't being reprocessed,
and cleaned up the loop increment logic.

Signed-off-by: lenny.chiadmi-delage <lenny.chiadmi-delage@epita.fr>
gcc/rust/checks/errors/feature/rust-feature-gate.cc
gcc/rust/expand/rust-cfg-strip.cc