diff mbox series

[094/125] gccrs: Update assignment operator with cratenum

Message ID 20240801145809.366388-96-arthur.cohen@embecosm.com
State New
Headers show
Series [001/125] Rust: Make 'tree'-level 'MAIN_NAME_P' work | expand

Commit Message

Arthur Cohen Aug. 1, 2024, 2:57 p.m. UTC
From: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Crate number was not assigned with the other fields in the assignment
operator overload of a CannonicalPath.

gcc/rust/ChangeLog:

	* util/rust-canonical-path.h: Also assign crate number.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
---
 gcc/rust/util/rust-canonical-path.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/gcc/rust/util/rust-canonical-path.h b/gcc/rust/util/rust-canonical-path.h
index f2865eba9ae..969ac7f7cc1 100644
--- a/gcc/rust/util/rust-canonical-path.h
+++ b/gcc/rust/util/rust-canonical-path.h
@@ -51,6 +51,7 @@  public:
   CanonicalPath &operator= (const CanonicalPath &other)
   {
     segs = other.segs;
+    crate_num = other.crate_num;
     return *this;
   }