diff options
author | Philip Herron <herron.philip@googlemail.com> | 2023-03-03 17:59:00 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-03-03 19:27:24 +0000 |
commit | f71f25af741238e911d38874da18a5654fc836f7 (patch) | |
tree | b6754894f879d48257da00b2dfe60194e912948d /gcc/rust | |
parent | 99b3cfe5cdd97dc36b5807ab635e484a7d0c9aa7 (diff) | |
download | gcc-f71f25af741238e911d38874da18a5654fc836f7.zip gcc-f71f25af741238e911d38874da18a5654fc836f7.tar.gz gcc-f71f25af741238e911d38874da18a5654fc836f7.tar.bz2 |
gccrs: Add missing node_id copys in the copy constructors
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/ChangeLog:
* ast/rust-path.h: add missing copy for node_id
Diffstat (limited to 'gcc/rust')
-rw-r--r-- | gcc/rust/ast/rust-path.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h index 5f7c5e3..a669ef5 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; |