From 2ff14448863ac1a1dd9533461708e29aae170c2d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:06:31 +0200 Subject: Adding debian version 1.65.0+dfsg1-2. Signed-off-by: Daniel Baumann --- compiler/rustc_save_analysis/src/dump_visitor.rs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'compiler/rustc_save_analysis/src/dump_visitor.rs') diff --git a/compiler/rustc_save_analysis/src/dump_visitor.rs b/compiler/rustc_save_analysis/src/dump_visitor.rs index e2e0e1f5b..8bd42d8d2 100644 --- a/compiler/rustc_save_analysis/src/dump_visitor.rs +++ b/compiler/rustc_save_analysis/src/dump_visitor.rs @@ -44,8 +44,6 @@ use rls_data::{ RefKind, Relation, RelationKind, SpanData, }; -use tracing::{debug, error}; - #[rustfmt::skip] // https://github.com/rust-lang/rustfmt/issues/5213 macro_rules! down_cast_data { ($id:ident, $kind:ident, $sp:expr) => { @@ -805,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); @@ -825,6 +824,7 @@ impl<'tcx> DumpVisitor<'tcx> { } // walk receiver and args + self.visit_expr(receiver); walk_list!(self, visit_expr, args); } @@ -914,7 +914,10 @@ impl<'tcx> DumpVisitor<'tcx> { _, ) | Res::SelfTy { .. } => { - self.dump_path_segment_ref(id, &hir::PathSegment::from_ident(ident)); + self.dump_path_segment_ref( + id, + &hir::PathSegment::new(ident, hir::HirId::INVALID, Res::Err), + ); } def => { error!("unexpected definition kind when processing collected idents: {:?}", def) @@ -974,7 +977,7 @@ impl<'tcx> DumpVisitor<'tcx> { self.process_macro_use(trait_item.span); match trait_item.kind { hir::TraitItemKind::Const(ref ty, body) => { - let body = body.map(|b| &self.tcx.hir().body(b).value); + let body = body.map(|b| self.tcx.hir().body(b).value); let attrs = self.tcx.hir().attrs(trait_item.hir_id()); self.process_assoc_const( trait_item.def_id, @@ -1303,7 +1306,7 @@ impl<'tcx> Visitor<'tcx> for DumpVisitor<'tcx> { if let hir::QPath::Resolved(_, path) = path { self.write_sub_paths_truncated(path); } - intravisit::walk_qpath(self, path, t.hir_id, t.span); + intravisit::walk_qpath(self, path, t.hir_id); } hir::TyKind::Array(ref ty, ref length) => { self.visit_ty(ty); @@ -1318,7 +1321,7 @@ impl<'tcx> Visitor<'tcx> for DumpVisitor<'tcx> { }), } } - hir::TyKind::OpaqueDef(item_id, _) => { + hir::TyKind::OpaqueDef(item_id, _, _) => { let item = self.tcx.hir().item(item_id); self.nest_typeck_results(item_id.def_id, |v| v.visit_item(item)); } @@ -1342,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); -- cgit v1.2.3