]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Fix object copying issue causing pointer inconsistency
authorRyutaro Okada <1015ryu88@gmail.com>
Sun, 3 Aug 2025 06:04:49 +0000 (23:04 -0700)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 5 Aug 2025 14:37:03 +0000 (16:37 +0200)
gcc/rust/ChangeLog:

* hir/rust-ast-lower-implitem.cc (ASTLowerTraitItem::visit):
Fix object copying issue causing pointer inconsistency

Signed-off-by: Ryutaro Okada <1015ryu88@gmail.com>
gcc/rust/hir/rust-ast-lower-implitem.cc

index a35d661338224ed8482a6ed85b7db655a7392888..5db11cbfa6ab976348546e502962c53e61364a31 100644 (file)
@@ -275,7 +275,7 @@ ASTLowerTraitItem::visit (AST::Function &func)
       auto hir_param
        = HIR::FunctionParam (mapping, std::move (translated_pattern),
                              std::move (translated_type), param.get_locus ());
-      function_params.push_back (hir_param);
+      function_params.push_back (std::move (hir_param));
     }
 
   if (func.has_self_param ())