[gccrs COMMIT 5/6] Remove duplicated error message.

gerris.rs@gmail.com gerris.rs@gmail.com
Thu Mar 5 15:06:51 GMT 2026


From: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

The expect token function already emits an error message for malformed
struct.

gcc/rust/ChangeLog:

	* parse/rust-parse-impl.hxx: Remove additional error message.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: https://github.com/Rust-GCC/gccrs/commit/1d7f6a0f16a8541bc5dcd159d6698ac9a4e14909

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4450

 gcc/rust/parse/rust-parse-impl.hxx | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/gcc/rust/parse/rust-parse-impl.hxx b/gcc/rust/parse/rust-parse-impl.hxx
index 9ed5eef15..c2ddb17c2 100644
--- a/gcc/rust/parse/rust-parse-impl.hxx
+++ b/gcc/rust/parse/rust-parse-impl.hxx
@@ -2979,10 +2979,6 @@ Parser<ManagedTokenSource>::parse_struct (AST::Visibility vis,
   const_TokenPtr name_tok = expect_token (IDENTIFIER);
   if (name_tok == nullptr)
     {
-      Error error (lexer.peek_token ()->get_locus (),
-		   "could not parse struct or tuple struct identifier");
-      add_error (std::move (error));
-
       // skip after somewhere?
       return nullptr;
     }
-- 
2.53.0



More information about the Gcc-rust mailing list