Skip to content

Commit fb5649c

Browse files
sakupan102philberty
authored andcommitted
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 <[email protected]>
1 parent b77dfdb commit fb5649c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcc/rust/hir/rust-ast-lower-implitem.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ ASTLowerTraitItem::visit (AST::Function &func)
275275
auto hir_param
276276
= HIR::FunctionParam (mapping, std::move (translated_pattern),
277277
std::move (translated_type), param.get_locus ());
278-
function_params.push_back (hir_param);
278+
function_params.push_back (std::move (hir_param));
279279
}
280280

281281
if (func.has_self_param ())

0 commit comments

Comments
 (0)