[gcc r14-7326] gccrs: fixup: parser: Fix bootstrap compile error

Arthur Cohen cohenarthur@gcc.gnu.org
Tue Jan 16 17:22:53 GMT 2024


https://gcc.gnu.org/g:060652cdd8b1fda6d108c87f421e78a885d5c173

commit r14-7326-g060652cdd8b1fda6d108c87f421e78a885d5c173
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Wed Mar 1 10:04:04 2023 +0100

    gccrs: fixup: parser: Fix bootstrap compile error
    
    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>

Diff:
---
 gcc/rust/parse/rust-parse-impl.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h
index 23171690d95..37b3244f326 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -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.


More information about the Gcc-cvs mailing list