https://gcc.gnu.org/g:3b9a0405f494774ce3054c87baea20aa3164eb4d

commit 3b9a0405f494774ce3054c87baea20aa3164eb4d
Author: Kushal Pal <kushalpal...@gmail.com>
Date:   Wed Apr 24 06:04:53 2024 +0000

    Removed obsolete objects
    
    gcc/rust/ChangeLog:
    
            * backend/rust-compile-expr.cc (CompileExpr::visit): Lines
            removed as the objects are unused.
    
    Signed-off-by: Kushal Pal <kushalpal...@gmail.com>

Diff:
---
 gcc/rust/backend/rust-compile-expr.cc | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/gcc/rust/backend/rust-compile-expr.cc 
b/gcc/rust/backend/rust-compile-expr.cc
index 6a9bb73ffe0f..b5b88b410e58 100644
--- a/gcc/rust/backend/rust-compile-expr.cc
+++ b/gcc/rust/backend/rust-compile-expr.cc
@@ -1304,23 +1304,14 @@ CompileExpr::visit (HIR::MethodCallExpr &expr)
     {
       const TyTy::DynamicObjectType *dyn
        = static_cast<const TyTy::DynamicObjectType *> (receiver->get_root ());
-
-      std::vector<HIR::Expr *> arguments;
-      for (auto &arg : expr.get_arguments ())
-       arguments.push_back (arg.get ());
-
       fn_expr
        = get_fn_addr_from_dyn (dyn, receiver, fntype, self, expr.get_locus ());
       self = get_receiver_from_dyn (dyn, receiver, fntype, self,
                                    expr.get_locus ());
     }
   else
-    {
-      // lookup compiled functions since it may have already been compiled
-      HIR::PathExprSegment method_name = expr.get_method_name ();
-      HIR::PathIdentSegment segment_name = method_name.get_segment ();
-      fn_expr = resolve_method_address (fntype, receiver, expr.get_locus ());
-    }
+    // lookup compiled functions since it may have already been compiled
+    fn_expr = resolve_method_address (fntype, receiver, expr.get_locus ());
 
   // lookup the autoderef mappings
   HirId autoderef_mappings_id

Reply via email to