Skip to content

Commit 8aebe6e

Browse files
authored
Changes in response to PR #119929 (comment)
1 parent 65c591b commit 8aebe6e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/librustdoc/html/sources.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use crate::error::Error;
55
use crate::html::format;
66
use crate::html::highlight;
77
use crate::html::layout;
8+
use crate::html::Page;
89
use crate::html::render::Context;
910
use crate::visit::DocVisitor;
1011

@@ -315,6 +316,7 @@ pub(crate) fn print_src(
315316
needs_expansion: bool,
316317
lines: RangeInclusive<usize>,
317318
code_html: Code,
319+
static_root_path: &'a str,
318320
}
319321
let lines = s.lines().count();
320322
let (embedded, needs_expansion, lines) = match source_context {
@@ -335,5 +337,6 @@ pub(crate) fn print_src(
335337
);
336338
Ok(())
337339
});
338-
Source { embedded, needs_expansion, lines, code_html: code }.render_into(&mut writer).unwrap();
340+
let static_root_path = get_static_root_path();
341+
Source { embedded, needs_expansion, lines, code_html: code, static_root_path }.render_into(&mut writer).unwrap();
339342
}

0 commit comments

Comments
 (0)