about summary refs log tree commit diff
path: root/src/librustdoc/html/render/cache.rs
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2020-05-29 11:31:55 -0400
committerFelix S. Klock II <pnkfelix@pnkfx.org>2020-05-29 23:41:45 -0400
commitda09fd3db0c71680e16311140d07e8f1e079af82 (patch)
tree63100f855b06ffe43d5cd9f4dba9489e20babf54 /src/librustdoc/html/render/cache.rs
parent905d738b1af874e248b9fe7fe4b115458975d401 (diff)
downloadrust-da09fd3db0c71680e16311140d07e8f1e079af82.tar.gz
rust-da09fd3db0c71680e16311140d07e8f1e079af82.zip
Split payload of FileName::Real to track both real and virutalized paths.
Such splits arise from metadata refs into libstd.

This way, we can (in a follow on commit) continue to emit the virtual name into
things like the like the StableSourceFileId that ends up in incremetnal build
artifacts, while still using the devirtualized file path when we want to access
the file.

Note that this commit is intended to be a refactoring; the actual fix to the bug
in question is in a follow-on commit.
Diffstat (limited to 'src/librustdoc/html/render/cache.rs')
-rw-r--r--src/librustdoc/html/render/cache.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/cache.rs b/src/librustdoc/html/render/cache.rs
index 57d385de320..22594077341 100644
--- a/src/librustdoc/html/render/cache.rs
+++ b/src/librustdoc/html/render/cache.rs
@@ -173,7 +173,7 @@ impl Cache {
         // Cache where all our extern crates are located
         for &(n, ref e) in &krate.externs {
             let src_root = match e.src {
-                FileName::Real(ref p) => match p.parent() {
+                FileName::Real(ref p) => match p.local_path().parent() {
                     Some(p) => p.to_path_buf(),
                     None => PathBuf::new(),
                 },