[gcc r16-8224] gccrs: Remove duplicated error message.

Arthur Cohen cohenarthur@gcc.gnu.org
Fri Mar 20 17:25:26 GMT 2026


https://gcc.gnu.org/g:515d64fa4b2f3396b46d24269d2009f786cfd2a8

commit r16-8224-g515d64fa4b2f3396b46d24269d2009f786cfd2a8
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Wed Mar 4 13:16:25 2026 +0100

    gccrs: Remove duplicated error message.
    
    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>

Diff:
---
 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 9ed5eef1591d..c2ddb17c2e0b 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;
     }


More information about the Gcc-cvs mailing list