]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Remove duplicated error message.
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 4 Mar 2026 12:16:25 +0000 (13:16 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 20 Mar 2026 17:10:48 +0000 (18:10 +0100)
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>
gcc/rust/parse/rust-parse-impl.hxx

index 9ed5eef1591d3352c72968ddb54d59f6eaf6fb7a..c2ddb17c2e0bcd7f819b5fcd51abefafbcad5cd6 100644 (file)
@@ -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;
     }