diff options
| author | bors <bors@rust-lang.org> | 2024-02-10 05:15:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-10 05:15:14 +0000 |
| commit | 5a3a2d5a5ea80b04df3fd3406f2bd924763d78a6 (patch) | |
| tree | 455bc9533122fc3f9c651366a44d110a9099eb8a /src/librustdoc/html/render | |
| parent | a5077d998934d0bb04bda2be1d0afe24b3170b16 (diff) | |
| parent | 45d5d4b1b3e728f2da0707062482d3bb4611586f (diff) | |
| download | rust-5a3a2d5a5ea80b04df3fd3406f2bd924763d78a6.tar.gz rust-5a3a2d5a5ea80b04df3fd3406f2bd924763d78a6.zip | |
Auto merge of #3293 - rust-lang:rustup-2024-02-10, r=saethlin
Automatic Rustup
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 b055e355b78..8ee35db56f8 100644 --- a/src/librustdoc/html/render/span_map.rs +++ b/src/librustdoc/html/render/span_map.rs @@ -94,7 +94,7 @@ impl<'tcx> SpanMapVisitor<'tcx> { /// Used to generate links on items' definition to go to their documentation page. pub(crate) fn extract_info_from_hir_id(&mut self, hir_id: HirId) { - if let Some(Node::Item(item)) = self.tcx.opt_hir_node(hir_id) { + if let Node::Item(item) = self.tcx.hir_node(hir_id) { if let Some(span) = self.tcx.def_ident_span(item.owner_id) { let cspan = clean::Span::new(span); // If the span isn't from the current crate, we ignore it. @@ -199,7 +199,7 @@ impl<'tcx> Visitor<'tcx> for SpanMapVisitor<'tcx> { if !span.overlaps(m.spans.inner_span) { // Now that we confirmed it's a file import, we want to get the span for the module // name only and not all the "mod foo;". - if let Some(Node::Item(item)) = self.tcx.opt_hir_node(id) { + if let Node::Item(item) = self.tcx.hir_node(id) { self.matches.insert( item.ident.span, LinkFromSrc::Local(clean::Span::new(m.spans.inner_span)), |
