https://gcc.gnu.org/g:c827177a53162bbbc72c5b2e5ea2200b7d6b33fd
commit r15-8093-gc827177a53162bbbc72c5b2e5ea2200b7d6b33fd Author: Kushal Pal <kushalpal...@gmail.com> Date: Wed Apr 24 06:04:53 2024 +0000 gccrs: 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 87458589864f..9ffd863629ba 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