Skip to content

Commit

Permalink
Rollup merge of rust-lang#57636 - GuillaumeGomez:fix-sources-sidebar,…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
Centril authored Jan 17, 2019
2 parents d35b6e2 + ed717f3 commit bf39858
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ themePicker.onblur = handleThemeButtonsBlur;
all_sources.sort();
let mut w = try_err!(File::create(&dst), &dst);
try_err!(writeln!(&mut w,
"var N = null;var sourcesIndex = {{}};\n{}",
"var N = null;var sourcesIndex = {{}};\n{}\ncreateSourceSidebar();",
all_sources.join("\n")),
&dst);
}
Expand Down
2 changes: 0 additions & 2 deletions src/librustdoc/html/static/source-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,3 @@ function createSourceSidebar() {

main.insertBefore(sidebar, main.firstChild);
}

createSourceSidebar();

0 comments on commit bf39858

Please sign in to comment.