From 035990c57b58a1dc95ac2a36a17a15d1ae7255a2 Mon Sep 17 00:00:00 2001 From: Arthur Cohen Date: Thu, 26 Dec 2024 21:31:21 +0000 Subject: ast: Fix warning about copy elision for moved expr gcc/rust/ChangeLog: * ast/rust-ast.cc (BlockExpr::normalize_tail_expr): Remove overzealous std::move --- gcc/rust/ast/rust-ast.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/rust/ast') diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc index d9197e3..ce4254a 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 (); } } -- cgit v1.1