Skip to content

Conversation

@Villosse
Copy link
Contributor

Fixes #4245

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 <[email protected]>
Adds tests for the testsuite

gcc/testsuite/ChangeLog:

	* rust/compile/issue-4245.rs: New test.

Signed-off-by: lenny.chiadmi-delage <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#![cfg_attr(..., feature)]` not respected

1 participant