Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add derive(Default) #3399

Merged
merged 2 commits into from
Feb 4, 2025
Merged

Conversation

CohenArthur
Copy link
Member

@CohenArthur CohenArthur commented Jan 30, 2025

Needs #3398 for the builder methods and #3400

Fixes #2993

gcc/rust/ChangeLog:

	* ast/rust-ast-builder.cc (Builder::qualified_path_in_expression): New.
	(Builder::function): Change the return type.
	* ast/rust-ast-builder.h: Declare qualified_path_in_expression functions.
	* expand/rust-derive-debug.cc (DeriveDebug::stub_debug_fn): Adapt to new APIs.
gcc/rust/ChangeLog:

	* expand/rust-derive.cc (DeriveVisitor::derive): Call DeriveDefault.
	* expand/rust-derive-default.cc: New file.
	* expand/rust-derive-default.h: New file.
	* Make-lang.in: Compile them.

gcc/testsuite/ChangeLog:

	* rust/compile/derive-default1.rs: New test.
	* rust/execute/torture/derive-default1.rs: New test.
	* rust/compile/nr2/exclude: Exclude them.
@CohenArthur CohenArthur marked this pull request as ready for review February 4, 2025 08:08
@CohenArthur CohenArthur enabled auto-merge February 4, 2025 08:08
@CohenArthur CohenArthur added this pull request to the merge queue Feb 4, 2025
Merged via the queue into Rust-GCC:master with commit f2164b7 Feb 4, 2025
12 checks passed
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.

Default
1 participant