From d8351d9168f92c997858fdb25942c05dc832f330 Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Thu, 24 Feb 2022 16:22:29 +0000 Subject: 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. --- gcc/rust/backend/rust-compile-expr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/rust/backend/rust-compile-expr.cc') 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; -- cgit v1.1