]> git.ipfire.org Git - people/ms/gcc.git/commitdiff
gccrs: Add missing node_id copys in the copy constructors
authorPhilip Herron <herron.philip@googlemail.com>
Fri, 3 Mar 2023 17:59:00 +0000 (17:59 +0000)
committerPhilip Herron <philip.herron@embecosm.com>
Fri, 3 Mar 2023 19:27:24 +0000 (19:27 +0000)
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/ChangeLog:

* ast/rust-path.h: add missing copy for node_id

gcc/rust/ast/rust-path.h

index 5f7c5e35f25855c27ec6bef65162a28c9a51988e..a669ef556d717462a11ca0b05af8ba453e9591ef 100644 (file)
@@ -1046,6 +1046,7 @@ public:
     : has_opening_scope_resolution (other.has_opening_scope_resolution),
       locus (other.locus)
   {
+    node_id = other.node_id;
     segments.reserve (other.segments.size ());
     for (const auto &e : other.segments)
       segments.push_back (e->clone_type_path_segment ());
@@ -1054,6 +1055,7 @@ public:
   // Overloaded assignment operator with clone
   TypePath &operator= (TypePath const &other)
   {
+    node_id = other.node_id;
     has_opening_scope_resolution = other.has_opening_scope_resolution;
     locus = other.locus;