]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/clean/types.rs
Use local and remapped paths where appropriate
[rust.git] / src / librustdoc / clean / types.rs
index 33cb11e539bf2d89f8d8e63633d89b697723bca0..3999ce7fa2a7815d9fead0c74b624b000a1f2aaf 100644 (file)
@@ -93,7 +93,7 @@ fn def_id(&self) -> DefId {
 
     crate fn src_root(&self, tcx: TyCtxt<'_>) -> PathBuf {
         match self.src(tcx) {
-            FileName::Real(ref p) => match p.local_path().parent() {
+            FileName::Real(ref p) => match p.local_path_if_available().parent() {
                 Some(p) => p.to_path_buf(),
                 None => PathBuf::new(),
             },