From 7f520ecc0c0eda5b0e649293759da392cf7f9284 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Wed, 30 Jul 2025 19:37:45 +0200 Subject: [PATCH] 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 --- 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 0b83e8ca2d8..09d5e244390 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) -- 2.47.2