diff options
| author | Urgau <urgau@numericable.fr> | 2024-03-19 13:51:22 +0100 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2024-03-28 18:47:26 +0100 |
| commit | ee2898d3f1cbece34153581823fafa7f572bbff0 (patch) | |
| tree | 6adcd3647b91cae40dcd75cf670f17b1a0267170 /src/librustdoc/html/render | |
| parent | 106146fd958c3c0d3428cfc7be1f75c5bc81698f (diff) | |
| download | rust-ee2898d3f1cbece34153581823fafa7f572bbff0.tar.gz rust-ee2898d3f1cbece34153581823fafa7f572bbff0.zip | |
Make local_crate_source_file return a RealFileName
so it can be remapped (or not) by callers
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index f1887684797..1ddcb3d8728 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -2506,7 +2506,7 @@ fn render_call_locations<W: fmt::Write>(mut w: W, cx: &mut Context<'_>, item: &c // 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()?; + let crate_src = tcx.sess.local_crate_source_file()?.into_local_path()?; 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()?; |
