diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-09-01 13:27:31 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-09-05 22:25:49 +0900 |
| commit | 87c6da363f04fe2e81eedaff6289f5cacb6e5538 (patch) | |
| tree | 38b8cbd17c7e656b3e50c76dc469db8f4dce760e /compiler/rustc_save_analysis | |
| parent | 6e4a9ab650b135ae0ff761e4a37d96c8bcaf7b3d (diff) | |
| download | rust-87c6da363f04fe2e81eedaff6289f5cacb6e5538.tar.gz rust-87c6da363f04fe2e81eedaff6289f5cacb6e5538.zip | |
separate the receiver from arguments in HIR
Diffstat (limited to 'compiler/rustc_save_analysis')
| -rw-r--r-- | compiler/rustc_save_analysis/src/dump_visitor.rs | 6 |
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 c9fc6b9e47a..1bd6b857e06 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); } @@ -1340,7 +1342,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); |
