Skip to content

Commit

Permalink
Rollup merge of rust-lang#59158 - Manishearth:fix-minification, r=Gui…
Browse files Browse the repository at this point in the history
…llaumeGomez

Revert "Don't generate minification variable if minification disabled"

Reverts rust-lang#58643

Fixes rust-lang#59157

rust-lang#58643 made us stop generating minification variables when minification is disabled, however they may still be needed for parent crates that were generated with minification (this will always be the case for libstd and libcore)

r? @QuietMisdreavus @GuillaumeGomez
  • Loading branch information
kennytm committed Mar 16, 2019
2 parents ce9efb1 + c37dab7 commit 25e4366
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,11 +1117,7 @@ themePicker.onblur = handleThemeButtonsBlur;
// with rustdoc running in parallel.
all_indexes.sort();
let mut w = try_err!(File::create(&dst), &dst);
if options.enable_minification {
try_err!(writeln!(&mut w, "var N=null,E=\"\",T=\"t\",U=\"u\",searchIndex={{}};"), &dst);
} else {
try_err!(writeln!(&mut w, "var searchIndex={{}};"), &dst);
}
try_err!(writeln!(&mut w, "var N=null,E=\"\",T=\"t\",U=\"u\",searchIndex={{}};"), &dst);
try_err!(write_minify_replacer(&mut w,
&format!("{}\n{}", variables.join(""), all_indexes.join("\n")),
options.enable_minification),
Expand Down

0 comments on commit 25e4366

Please sign in to comment.