about summary refs log tree commit diff
path: root/src/librustdoc/html/render
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-01-19 05:23:40 +0000
committerbors <bors@rust-lang.org>2023-01-19 05:23:40 +0000
commit65d2f2a5f9c323c88d1068e8e90d0b47a20d491c (patch)
treedee0cdbd8d893160c307f5afb7cb8d7373d8dfca /src/librustdoc/html/render
parent6ba6d22bdf5348e566dedc77a7dfee3f3804f2fb (diff)
parent13555593672b49b5306990d63d0e61a49e17d9f0 (diff)
downloadrust-65d2f2a5f9c323c88d1068e8e90d0b47a20d491c.tar.gz
rust-65d2f2a5f9c323c88d1068e8e90d0b47a20d491c.zip
Auto merge of #106810 - oli-obk:resolver_reverse_plumbing, r=petrochenkov
Various cleanups around pre-TyCtxt queries and functions

part of #105462

based on https://github.com/rust-lang/rust/pull/106776 (everything starting at [0e2b39f](https://github.com/rust-lang/rust/pull/106810/commits/0e2b39fd1ffde51b50d45ccbe41de52b85136b8b) is new in this PR)

r? `@petrochenkov`

I think this should be most of the uncontroversial part of #105462.
Diffstat (limited to 'src/librustdoc/html/render')
-rw-r--r--src/librustdoc/html/render/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index f95d8e43035..4fa33e8907d 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -2921,7 +2921,7 @@ fn render_call_locations(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Ite
         // Look for the example file in the source map if it exists, otherwise return a dummy span
         let file_span = (|| {
             let source_map = tcx.sess.source_map();
-            let crate_src = tcx.sess.local_crate_source_file.as_ref()?;
+            let crate_src = tcx.sess.local_crate_source_file()?;
             let abs_crate_src = crate_src.canonicalize().ok()?;
             let crate_root = abs_crate_src.parent()?.parent()?;
             let rel_path = path.strip_prefix(crate_root).ok()?;