]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: We cant clone types as it will dup the node-id
authorPhilip Herron <herron.philip@googlemail.com>
Sun, 11 May 2025 14:03:05 +0000 (15:03 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 5 Aug 2025 14:36:42 +0000 (16:36 +0200)
commit97fc34aab827cba7b6d29e451585a1db82deb24c
tree1b13fab373a484f5bba0c6fab7da2571d3bc88e5
parent7e38e0ca35d2c6d5850a6f1c1e2e7875106fe405
gccrs: We cant clone types as it will dup the node-id

This patch ensuers we reuse the Builder for new type to
ensure we create a new type from scratch ensuring consistent
new node-ids.

gcc/rust/ChangeLog:

* expand/rust-derive-default.cc (DeriveDefault::visit_struct): use builder
(DeriveDefault::visit_tuple): likewise
* expand/rust-derive-eq.cc (DeriveEq::visit_tuple): likewise
(DeriveEq::visit_struct): likewise
(DeriveEq::visit_enum): likewise
(DeriveEq::visit_union): likewise

gcc/testsuite/ChangeLog:

* rust/compile/nr2/exclude: these are fixed now

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/expand/rust-derive-default.cc
gcc/rust/expand/rust-derive-eq.cc
gcc/testsuite/rust/compile/nr2/exclude