]> git.ipfire.org Git - people/ms/gcc.git/commitdiff
fixup: parser: Fix bootstrap compile error
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 1 Mar 2023 09:04:04 +0000 (10:04 +0100)
committerCohenArthur <arthur.cohen@embecosm.com>
Thu, 2 Mar 2023 13:51:12 +0000 (13:51 +0000)
The recent changes in the parser bringing the parsing of extern type
items also brought a compilation error when boostrapping the compiler.

gcc/rust/ChangeLog:

* parse/rust-parse-impl.h (Parser::parse_external_type_item):
Fix compilation error due to unnecessary move.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/parse/rust-parse-impl.h

index 63e425e5b83e65881a0308e26c8e8850e51b36f3..15effaa1979e9f68174c3c128067009d173dca1b 100644 (file)
@@ -4013,9 +4013,8 @@ Parser<ManagedTokenSource>::parse_external_type_item (AST::Visibility vis,
     return nullptr;
 
   return std::unique_ptr<AST::ExternalTypeItem> (
-    new AST::ExternalTypeItem (std::move (alias_name_tok->get_str ()),
-                              std::move (vis), std::move (outer_attrs),
-                              std::move (locus)));
+    new AST::ExternalTypeItem (alias_name_tok->get_str (), std::move (vis),
+                              std::move (outer_attrs), std::move (locus)));
 }
 
 // Parses a "type alias" (typedef) item.