Skip to content

Conversation

@lucasly-ba
Copy link
Contributor

@lucasly-ba lucasly-ba commented Oct 14, 2025

Derive may only be applied to structs, enums and unions.

Fixes #3971

gcc/rust/ChangeLog:

* expand/rust-expand-visitor.cc(ExpandVisitor::expand_inner_items): Added check and error.

gcc/testsuite/ChangeLog:

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

Signed-off-by: Lucas Ly Ba lucas.ly-ba@outlook.com

@lucasly-ba lucasly-ba force-pushed the 3972 branch 5 times, most recently from c246504 to 561b83b Compare October 18, 2025 09:34
Derive may only be applied to structs, enums and unions.

gcc/rust/ChangeLog:

	* expand/rust-derive.cc (DeriveVisitor::derive):
	Add check and error.

gcc/testsuite/ChangeLog:

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

Signed-off-by: Lucas Ly Ba <lucas.ly-ba@outlook.com>
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.

segfault in expansion

3 participants