]> git.ipfire.org Git - thirdparty/gcc.git/commit
derive(PartialEq): Allow deriving enum structs
authorArthur Cohen <arthur.cohen@embecosm.com>
Wed, 16 Apr 2025 15:38:27 +0000 (17:38 +0200)
committerCohenArthur <arthur.cohen@embecosm.com>
Fri, 2 May 2025 14:46:25 +0000 (14:46 +0000)
commit5d01bb8c5525b464e7713a15b8db4ffc69a3025a
tree98cc436a7f5f1b74f7da828a288acda20760b918
parentecf19aca7569bca599d8942f2a3a59b7430374b0
derive(PartialEq): Allow deriving enum structs

gcc/rust/ChangeLog:

* expand/rust-derive-partial-eq.cc (DerivePartialEq::match_enum_tuple): Remove debug call.
(DerivePartialEq::match_enum_struct): Add proper implementation.
(DerivePartialEq::visit_enum): Call it.

gcc/testsuite/ChangeLog:

* rust/execute/torture/derive-partialeq2.rs: New test.
gcc/rust/expand/rust-derive-partial-eq.cc
gcc/testsuite/rust/execute/torture/derive-partialeq2.rs [new file with mode: 0644]