aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-ast.cc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-12-26 21:31:21 +0000
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-21 12:56:57 +0100
commit592540266306438fe61e8951cfc2df577dcf2112 (patch)
tree7d7aa494b46d116434eb986e304cb17ef30cf315 /gcc/rust/ast/rust-ast.cc
parent3a82942eaa26060e02bcd1bafc6820d1399ac335 (diff)
downloadgcc-592540266306438fe61e8951cfc2df577dcf2112.zip
gcc-592540266306438fe61e8951cfc2df577dcf2112.tar.gz
gcc-592540266306438fe61e8951cfc2df577dcf2112.tar.bz2
gccrs: ast: Fix warning about copy elision for moved expr
gcc/rust/ChangeLog: * ast/rust-ast.cc (BlockExpr::normalize_tail_expr): Remove overzealous std::move
Diffstat (limited to 'gcc/rust/ast/rust-ast.cc')
-rw-r--r--gcc/rust/ast/rust-ast.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc
index 25e522b..45189a1 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 ();
}
}