Skip to content

Commit bf39858

Browse files
authored
Rollup merge of rust-lang#57636 - GuillaumeGomez:fix-sources-sidebar, r=QuietMisdreavus
Fix sources sidebar not showing up Fixes rust-lang#57601. The order of imports made it so that the sidebar creation was called before the sidebar sources were created. Like this, when the sources are loaded, they create the sidebar as expected. r? @QuietMisdreavus
2 parents d35b6e2 + ed717f3 commit bf39858

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/librustdoc/html/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ themePicker.onblur = handleThemeButtonsBlur;
10421042
all_sources.sort();
10431043
let mut w = try_err!(File::create(&dst), &dst);
10441044
try_err!(writeln!(&mut w,
1045-
"var N = null;var sourcesIndex = {{}};\n{}",
1045+
"var N = null;var sourcesIndex = {{}};\n{}\ncreateSourceSidebar();",
10461046
all_sources.join("\n")),
10471047
&dst);
10481048
}

src/librustdoc/html/static/source-script.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,3 @@ function createSourceSidebar() {
137137

138138
main.insertBefore(sidebar, main.firstChild);
139139
}
140-
141-
createSourceSidebar();

0 commit comments

Comments
 (0)