Skip to content

Conversation

@Pasta-coder
Copy link
Contributor

This patch introduces a local helper in DeriveEq. This removes the duplication of the hardcoded path {core, cmp, Eq} used in both and .

gcc/rust/ChangeLog:

* expand/rust-derive-eq.cc (get_eq_trait_path): New helper.
(DeriveEq::assert_param_is_eq): Use helper.
(DeriveEq::eq_impls): Use helper.

@Pasta-coder Pasta-coder force-pushed the refactor/derive-eq-helper branch 3 times, most recently from 484801d to 0555ab0 Compare January 16, 2026 19:23
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

This looks good! Thank you!

This patch introduces a local helper  in DeriveEq.
This removes the duplication of the hardcoded path {core, cmp, Eq}
used in both  and .

gcc/rust/ChangeLog:

	* expand/rust-derive-eq.cc (get_eq_trait_path): New helper.
	(DeriveEq::assert_param_is_eq): Use helper.
	(DeriveEq::eq_impls): Use helper.

Signed-off-by: Jayant Chauhan <0001jayant@gmail.com>
@Pasta-coder Pasta-coder force-pushed the refactor/derive-eq-helper branch from 0555ab0 to b3bb087 Compare January 18, 2026 04:58
@Pasta-coder
Copy link
Contributor Author

Pasta-coder commented Jan 18, 2026

@CohenArthur , thank you for the review .

will also keep this in mind for future prs .

@CohenArthur CohenArthur added this pull request to the merge queue Jan 19, 2026
Merged via the queue into Rust-GCC:master with commit d2f8f64 Jan 19, 2026
12 checks passed
@Pasta-coder Pasta-coder deleted the refactor/derive-eq-helper branch January 20, 2026 06:39
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