aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-02-24 16:22:29 +0000
committerPhilip Herron <philip.herron@embecosm.com>2022-02-24 16:39:12 +0000
commitd8351d9168f92c997858fdb25942c05dc832f330 (patch)
treec5937fb363281a91eb7230141f308b932528fc09 /gcc/rust/backend/rust-compile-expr.cc
parent5d5396d52277be5e2c82249f889a78d909f29084 (diff)
downloadgcc-d8351d9168f92c997858fdb25942c05dc832f330.zip
gcc-d8351d9168f92c997858fdb25942c05dc832f330.tar.gz
gcc-d8351d9168f92c997858fdb25942c05dc832f330.tar.bz2
Decouple the HIR::OperatorExpr from resolving operator overloads
This means we can reuse the same code for operations that are not HIR::OperatorExpr's such as ArrayIndexExpr which can resolve to core::ops::index lang items.
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.cc')
-rw-r--r--gcc/rust/backend/rust-compile-expr.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc
index 6849471..dfe5231 100644
--- a/gcc/rust/backend/rust-compile-expr.cc
+++ b/gcc/rust/backend/rust-compile-expr.cc
@@ -790,7 +790,7 @@ CompileExpr::resolve_method_address (TyTy::FnType *fntype, HirId ref,
tree
CompileExpr::resolve_operator_overload (
- Analysis::RustLangItem::ItemType lang_item_type, HIR::OperatorExpr &expr,
+ Analysis::RustLangItem::ItemType lang_item_type, HIR::OperatorExprMeta expr,
tree lhs, tree rhs, HIR::Expr *lhs_expr, HIR::Expr *rhs_expr)
{
TyTy::FnType *fntype;