aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyutaro Okada <1015ryu88@gmail.com>2025-08-02 23:04:49 -0700
committerArthur Cohen <arthur.cohen@embecosm.com>2025-08-05 16:37:03 +0200
commit759e57acac75c94548e78af99bcf350ebce9de3a (patch)
tree95812668746297790edc7cc73fd821d7be5cceca
parent35d2c4cfe3a1d2b5c4a9754ed4aa34c668d52173 (diff)
downloadgcc-759e57acac75c94548e78af99bcf350ebce9de3a.zip
gcc-759e57acac75c94548e78af99bcf350ebce9de3a.tar.gz
gcc-759e57acac75c94548e78af99bcf350ebce9de3a.tar.bz2
gccrs: Fix object copying issue causing pointer inconsistency
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>
-rw-r--r--gcc/rust/hir/rust-ast-lower-implitem.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/hir/rust-ast-lower-implitem.cc b/gcc/rust/hir/rust-ast-lower-implitem.cc
index a35d661..5db11cb 100644
--- a/gcc/rust/hir/rust-ast-lower-implitem.cc
+++ b/gcc/rust/hir/rust-ast-lower-implitem.cc
@@ -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 ())