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>
Copy link
Member

@philberty philberty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@philberty philberty added this pull request to the merge queue Nov 17, 2025
@philberty philberty added the AST label Nov 17, 2025
Merged via the queue into Rust-GCC:master with commit f06a3c4 Nov 17, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in libcore 1.49 Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

segfault in expansion

4 participants