]> 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)
committerPhilip Herron <philip.herron@embecosm.com>
Tue, 13 May 2025 09:16:28 +0000 (09:16 +0000)
commit4e63248e89a026e4bce4c79b1697ad0243f0f3aa
tree5a1a9e74f7bf4b97ff7c88572ac6cc8a17283835
parent0d563507555c48d184059e9d8e4e58fec36a9e53
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