diff options
Diffstat (limited to 'src/librustdoc/html/sources.rs')
| -rw-r--r-- | src/librustdoc/html/sources.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustdoc/html/sources.rs b/src/librustdoc/html/sources.rs index d13822b7b62..1ac0c10c612 100644 --- a/src/librustdoc/html/sources.rs +++ b/src/librustdoc/html/sources.rs @@ -17,7 +17,7 @@ use crate::clean::utils::has_doc_flag; use crate::docfs::PathError; use crate::error::Error; use crate::html::render::Context; -use crate::html::{format, highlight, layout}; +use crate::html::{highlight, layout}; use crate::visit::DocVisitor; pub(crate) fn render(cx: &mut Context<'_>, krate: &clean::Crate) -> Result<(), Error> { @@ -331,10 +331,10 @@ pub(crate) fn print_src( decoration_info: &highlight::DecorationInfo, source_context: SourceContext<'_>, ) { - let current_href = context - .href_from_span(clean::Span::new(file_span), false) - .expect("only local crates should have sources emitted"); - let code = format::display_fn(move |fmt| { + let code = fmt::from_fn(move |fmt| { + let current_href = context + .href_from_span(clean::Span::new(file_span), false) + .expect("only local crates should have sources emitted"); highlight::write_code( fmt, s, |
