https://gcc.gnu.org/g:7f520ecc0c0eda5b0e649293759da392cf7f9284

commit r16-2969-g7f520ecc0c0eda5b0e649293759da392cf7f9284
Author: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com>
Date:   Wed Jul 30 19:37:45 2025 +0200

    gccrs: Error message field member was not properly updated
    
    gcc/rust/ChangeLog:
    
            * rust-diagnostics.h (struct Error): Add disambiguation.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com>

Diff:
---
 gcc/rust/rust-diagnostics.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/rust/rust-diagnostics.h b/gcc/rust/rust-diagnostics.h
index 0b83e8ca2d81..09d5e2443904 100644
--- a/gcc/rust/rust-diagnostics.h
+++ b/gcc/rust/rust-diagnostics.h
@@ -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)

Reply via email to