diff options
| author | kennytm <kennytm@gmail.com> | 2019-03-16 14:56:53 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2019-03-16 22:40:30 +0800 |
| commit | 25e4366b4cea8ef52f3d1f1ff4f26df3587ae9f6 (patch) | |
| tree | e98f730548bfadb0a9f86b5d146ec7e62f5ee0f3 | |
| parent | ce9efb18226568878821b7198cf229966157d4c2 (diff) | |
| parent | c37dab7df82e38788648044017ba6dc48c240776 (diff) | |
| download | rust-25e4366b4cea8ef52f3d1f1ff4f26df3587ae9f6.tar.gz rust-25e4366b4cea8ef52f3d1f1ff4f26df3587ae9f6.zip | |
Rollup merge of #59158 - Manishearth:fix-minification, r=GuillaumeGomez
Revert "Don't generate minification variable if minification disabled" Reverts #58643 Fixes #59157 https://github.com/rust-lang/rust/pull/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
| -rw-r--r-- | src/librustdoc/html/render.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index d711e4514a0..5109e775ebf 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -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), |
