diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2024-11-20 13:35:22 +0100 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2024-11-20 13:36:42 +0000 |
commit | 65e5335d9c40367f6232d7f3b995b5b4a66f216e (patch) | |
tree | f2199e95dd232304c48ec0f482e00eed525374ca /gcc/rust/backend/rust-compile-expr.h | |
parent | a163db5bc475a5ce6877f332b870613dd390ea09 (diff) | |
download | gcc-65e5335d9c40367f6232d7f3b995b5b4a66f216e.zip gcc-65e5335d9c40367f6232d7f3b995b5b4a66f216e.tar.gz gcc-65e5335d9c40367f6232d7f3b995b5b4a66f216e.tar.bz2 |
Use a reference wrapper to please GCC 4.8
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Change call.
(CompileExpr::resolve_operator_overload): Update function arguments.
* backend/rust-compile-expr.h: Change the function's prototype to use
a reference wrapper instead of a reference within the optional.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h index 872b510..9e7af42 100644 --- a/gcc/rust/backend/rust-compile-expr.h +++ b/gcc/rust/backend/rust-compile-expr.h @@ -96,10 +96,10 @@ protected: TyTy::BaseType *receiver, TyTy::FnType *fntype, tree receiver_ref, location_t expr_locus); - tree resolve_operator_overload (LangItem::Kind lang_item_type, - HIR::OperatorExprMeta expr, tree lhs, - tree rhs, HIR::Expr &lhs_expr, - tl::optional<HIR::Expr &> rhs_expr); + tree resolve_operator_overload ( + LangItem::Kind lang_item_type, HIR::OperatorExprMeta expr, tree lhs, + tree rhs, HIR::Expr &lhs_expr, + tl::optional<std::reference_wrapper<HIR::Expr>> rhs_expr); tree compile_bool_literal (const HIR::LiteralExpr &expr, const TyTy::BaseType *tyty); |