]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Update assignment operator with cratenum
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 13 Mar 2024 15:21:44 +0000 (16:21 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 1 Aug 2024 14:52:27 +0000 (16:52 +0200)
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

index f2865eba9ae407cf364c8da9d4304107f5308bd2..969ac7f7cc18c27345135d00b5719cc0ece5c4c5 100644 (file)
@@ -51,6 +51,7 @@ public:
   CanonicalPath &operator= (const CanonicalPath &other)
   {
     segs = other.segs;
+    crate_num = other.crate_num;
     return *this;
   }