about summary refs log tree commit diff
path: root/compiler/rustc_save_analysis/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-05 16:21:40 +0000
committerbors <bors@rust-lang.org>2022-09-05 16:21:40 +0000
commitb44197abb0b3ffe4908892e1e08ab1cd721ff3b9 (patch)
treeb6fb0e22306ad314d139ff05bfc3137c2cc7265a /compiler/rustc_save_analysis/src
parent2dc703fd6e3aaaf343828cc7dd1aec192d24c628 (diff)
parent9cde34e1807208493b3975c155e0c5389820a8ce (diff)
downloadrust-b44197abb0b3ffe4908892e1e08ab1cd721ff3b9.tar.gz
rust-b44197abb0b3ffe4908892e1e08ab1cd721ff3b9.zip
Auto merge of #101261 - TaKO8Ki:separate-receiver-from-arguments-in-hir, r=cjgillot
Separate the receiver from arguments in HIR

Related to #100232

cc `@cjgillot`
Diffstat (limited to 'compiler/rustc_save_analysis/src')
-rw-r--r--compiler/rustc_save_analysis/src/dump_visitor.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_save_analysis/src/dump_visitor.rs b/compiler/rustc_save_analysis/src/dump_visitor.rs
index d4b4d3c229c..6658892881d 100644
--- a/compiler/rustc_save_analysis/src/dump_visitor.rs
+++ b/compiler/rustc_save_analysis/src/dump_visitor.rs
@@ -803,6 +803,7 @@ impl<'tcx> DumpVisitor<'tcx> {
         &mut self,
         ex: &'tcx hir::Expr<'tcx>,
         seg: &'tcx hir::PathSegment<'tcx>,
+        receiver: &'tcx hir::Expr<'tcx>,
         args: &'tcx [hir::Expr<'tcx>],
     ) {
         debug!("process_method_call {:?} {:?}", ex, ex.span);
@@ -823,6 +824,7 @@ impl<'tcx> DumpVisitor<'tcx> {
         }
 
         // walk receiver and args
+        self.visit_expr(receiver);
         walk_list!(self, visit_expr, args);
     }
 
@@ -1343,7 +1345,9 @@ impl<'tcx> Visitor<'tcx> for DumpVisitor<'tcx> {
                 let res = self.save_ctxt.get_path_res(hir_expr.hir_id);
                 self.process_struct_lit(ex, path, fields, adt.variant_of_res(res), *rest)
             }
-            hir::ExprKind::MethodCall(ref seg, args, _) => self.process_method_call(ex, seg, args),
+            hir::ExprKind::MethodCall(ref seg, receiver, args, _) => {
+                self.process_method_call(ex, seg, receiver, args)
+            }
             hir::ExprKind::Field(ref sub_ex, _) => {
                 self.visit_expr(&sub_ex);