From 10c4a2ce03c99c1394e9d610c0f38ce990284181 Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Fri, 3 Mar 2023 17:59:00 +0000 Subject: gccrs: Add missing node_id copys in the copy constructors Signed-off-by: Philip Herron gcc/rust/ChangeLog: * ast/rust-path.h: add missing copy for node_id --- gcc/rust/ast/rust-path.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/rust') diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h index 84c64b24..0b9c280 100644 --- a/gcc/rust/ast/rust-path.h +++ b/gcc/rust/ast/rust-path.h @@ -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; -- cgit v1.1