]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Error message field member was not properly updated
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 30 Jul 2025 17:37:45 +0000 (19:37 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 5 Aug 2025 14:36:59 +0000 (16:36 +0200)
gcc/rust/ChangeLog:

* rust-diagnostics.h (struct Error): Add disambiguation.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/rust-diagnostics.h

index 0b83e8ca2d8149c388a7276f576425768b70cd5f..09d5e244390403cfd78fb1d7c4994387fccb0386 100644 (file)
@@ -183,7 +183,7 @@ struct Error
   Error (Kind kind, location_t locus, std::string message)
     : kind (kind), locus (locus), message (std::move (message))
   {
-    message.shrink_to_fit ();
+    this->message.shrink_to_fit ();
   }
   // simple location + error code
   Error (Kind kind, location_t locus, ErrorCode code, std::string message)
@@ -191,13 +191,13 @@ struct Error
       message (std::move (message))
   {
     is_errorcode = true;
-    message.shrink_to_fit ();
+    this->message.shrink_to_fit ();
   }
   // rich location
   Error (Kind kind, rich_location *richlocus, std::string message)
     : kind (kind), richlocus (richlocus), message (std::move (message))
   {
-    message.shrink_to_fit ();
+    this->message.shrink_to_fit ();
   }
   // rich location + error code
   Error (Kind kind, rich_location *richlocus, ErrorCode code,
@@ -206,7 +206,7 @@ struct Error
       message (std::move (message))
   {
     is_errorcode = true;
-    message.shrink_to_fit ();
+    this->message.shrink_to_fit ();
   }
   // simple location
   Error (location_t locus, std::string message)