From: Arthur Cohen Date: Thu, 26 Dec 2024 21:31:21 +0000 (+0000) Subject: ast: Fix warning about copy elision for moved expr X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=035990c57b58a1dc95ac2a36a17a15d1ae7255a2;p=thirdparty%2Fgcc.git ast: Fix warning about copy elision for moved expr gcc/rust/ChangeLog: * ast/rust-ast.cc (BlockExpr::normalize_tail_expr): Remove overzealous std::move --- diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc index d9197e3db05..ce4254ac8d0 100644 --- a/gcc/rust/ast/rust-ast.cc +++ b/gcc/rust/ast/rust-ast.cc @@ -4270,7 +4270,7 @@ BlockExpr::normalize_tail_expr () if (!stmt.is_semicolon_followed ()) { - expr = std::move (stmt.take_expr ()); + expr = stmt.take_expr (); statements.pop_back (); } }