diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-12-26 21:31:21 +0000 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-21 12:56:57 +0100 |
commit | 592540266306438fe61e8951cfc2df577dcf2112 (patch) | |
tree | 7d7aa494b46d116434eb986e304cb17ef30cf315 /gcc/rust/ast/rust-ast.cc | |
parent | 3a82942eaa26060e02bcd1bafc6820d1399ac335 (diff) | |
download | gcc-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.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 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 (); } } |