]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Update assignment operator with cratenum
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 13 Mar 2024 15:21:44 +0000 (16:21 +0100)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Tue, 26 Mar 2024 17:35:02 +0000 (17:35 +0000)
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;
   }