diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2021-12-01 11:17:50 -0600 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2022-01-21 07:48:10 -0600 |
| commit | b11733534d95aebe0b4f949f8e4c8f21c312f108 (patch) | |
| tree | 12ff6db964e10b1c2e6e8f0d19a23d06c0de77c3 /src/librustdoc/html/render | |
| parent | 84e918971d643c6a33067d5125214ab800ce5307 (diff) | |
| download | rust-b11733534d95aebe0b4f949f8e4c8f21c312f108.tar.gz rust-b11733534d95aebe0b4f949f8e4c8f21c312f108.zip | |
Remove a span from hir::ExprKind::MethodCall
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/span_map.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/render/span_map.rs b/src/librustdoc/html/render/span_map.rs index 221e0113d3a..586f34cd2c8 100644 --- a/src/librustdoc/html/render/span_map.rs +++ b/src/librustdoc/html/render/span_map.rs @@ -130,7 +130,7 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> { } fn visit_expr(&mut self, expr: &'tcx rustc_hir::Expr<'tcx>) { - if let ExprKind::MethodCall(segment, method_span, _, _) = expr.kind { + if let ExprKind::MethodCall(segment, ..) = expr.kind { if let Some(hir_id) = segment.hir_id { let hir = self.tcx.hir(); let body_id = hir.enclosing_body_owner(hir_id); @@ -141,7 +141,7 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> { }); if let Some(def_id) = typeck_results.type_dependent_def_id(expr.hir_id) { self.matches.insert( - method_span, + segment.ident.span, match hir.span_if_local(def_id) { Some(span) => LinkFromSrc::Local(clean::Span::new(span)), None => LinkFromSrc::External(def_id), |
