Skip to content

Commit e264980

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 4091ca0 + ed717f3 commit e264980

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
@@ -1076,7 +1076,7 @@ themePicker.onblur = handleThemeButtonsBlur;
10761076
all_sources.sort();
10771077
let mut w = try_err!(File::create(&dst), &dst);
10781078
try_err!(writeln!(&mut w,
1079-
"var N = null;var sourcesIndex = {{}};\n{}",
1079+
"var N = null;var sourcesIndex = {{}};\n{}\ncreateSourceSidebar();",
10801080
all_sources.join("\n")),
10811081
&dst);
10821082
}

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)