diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-12-26 21:31:21 +0000 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2025-01-16 14:00:31 +0000 |
commit | 035990c57b58a1dc95ac2a36a17a15d1ae7255a2 (patch) | |
tree | 82700894df29b77b4cba9be9689484034178a33c /gcc | |
parent | bb580033c6c857771415723d704642ee7a238a12 (diff) | |
download | gcc-035990c57b58a1dc95ac2a36a17a15d1ae7255a2.zip gcc-035990c57b58a1dc95ac2a36a17a15d1ae7255a2.tar.gz gcc-035990c57b58a1dc95ac2a36a17a15d1ae7255a2.tar.bz2 |
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')
-rw-r--r-- | gcc/rust/ast/rust-ast.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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 (); } } |