From: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com> gcc/rust/ChangeLog:
* expand/rust-macro-builtins-helpers.cc: Remove use after move. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com> --- gcc/rust/expand/rust-macro-builtins-helpers.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/rust/expand/rust-macro-builtins-helpers.cc b/gcc/rust/expand/rust-macro-builtins-helpers.cc index 864379a3ffa..19af5df4a68 100644 --- a/gcc/rust/expand/rust-macro-builtins-helpers.cc +++ b/gcc/rust/expand/rust-macro-builtins-helpers.cc @@ -68,6 +68,7 @@ make_eager_builtin_invocation ( { auto path_str = make_macro_path_str (kind); + auto token_stream = arguments.to_token_stream (); std::unique_ptr<AST::Expr> node = AST::MacroInvocation::Builtin ( kind, AST::MacroInvocData (AST::SimplePath ( @@ -76,7 +77,7 @@ make_eager_builtin_invocation ( {}, locus, std::move (pending_invocations)); return AST::Fragment ({AST::SingleASTNode (std::move (node))}, - arguments.to_token_stream ()); + std::move (token_stream)); } /* Match the end token of a macro given the start delimiter of the macro */ -- 2.49.0