diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index 2ae203e0d2f88..40453de84058d 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -665,7 +665,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { _ => unreachable!(), }; let items = self.build_sidebar_items(module); - let js_dst = self.dst.join("sidebar-items.js"); + let js_dst = self.dst.join(&format!("sidebar-items{}.js", self.shared.resource_suffix)); let v = format!("initSidebarItems({});", serde_json::to_string(&items).unwrap()); scx.fs.write(js_dst, v)?; } diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 2038e3381862b..d63df4e41307a 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -1827,7 +1827,11 @@ fn print_sidebar(cx: &Context<'_>, it: &clean::Item, buffer: &mut Buffer) { ty = it.type_(), path = relpath ); - write!(buffer, "", relpath); + write!( + buffer, + "", + relpath, cx.shared.resource_suffix + ); // Closes sidebar-elems div. buffer.write_str(""); }