Skip to content

gccrs: Fix deriving with generic const args - #4715

Merged
powerboat9 merged 1 commit into
Rust-GCC:masterfrom
powerboat9:fix-derive
Jul 24, 2026
Merged

gccrs: Fix deriving with generic const args#4715
powerboat9 merged 1 commit into
Rust-GCC:masterfrom
powerboat9:fix-derive

Conversation

@powerboat9

Copy link
Copy Markdown
Collaborator

This doesn't fix an issue with the typechecker, so the included test only compiles up to the typechecking phase.

@philberty everything look good? This PR shouldn't be causing issues with the typechecker?

@CohenArthur CohenArthur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM :)

@CohenArthur

Copy link
Copy Markdown
Member

I can't speak for the typechecking part but the deriving part looks 👍

This doesn't fix an issue with the typechecker, so the included test
only compiles up to the typechecking phase.

gcc/rust/ChangeLog:

	* expand/rust-derive.cc (DeriveVisitor::setup_impl_generics):
	Create a constant generic argument from a constant generic
	parameter.

gcc/testsuite/ChangeLog:

	* rust/compile/derive_macro9.rs: New test.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
@powerboat9
powerboat9 enabled auto-merge July 24, 2026 22:18
@powerboat9
powerboat9 added this pull request to the merge queue Jul 24, 2026
Merged via the queue into Rust-GCC:master with commit 0fcbc90 Jul 24, 2026
13 checks passed
@powerboat9
powerboat9 deleted the fix-derive branch July 26, 2026 18:07
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.

2 participants