9 files changed, 15 insertions(+), 62 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
-index 15cbb26..c012319 100644
+index 1fcaaf6..4c2a1be 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,29 +18,15 @@ members = [
"src/tools/lld-wrapper",
"src/tools/collect-license-metadata",
"src/tools/generate-copyright",
-@@ -105,9 +91,6 @@ miniz_oxide.debug = 0
+@@ -106,9 +92,6 @@ miniz_oxide.debug = 0
object.debug = 0
[patch.crates-io]
# See comments in `library/rustc-std-workspace-core/README.md` for what's going on
# here
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 013d1ab..f6fd37b 100644
+index 0251452..807de4d 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
-@@ -777,10 +777,6 @@ class RustBuild(object):
+@@ -781,10 +781,6 @@ class RustBuild(object):
args = [self.cargo(), "build", "--manifest-path",
os.path.join(self.rust_root, "src/bootstrap/Cargo.toml")]
args.extend("--verbose" for _ in range(verbose_count))
args.append("--features")
args.append("build-metrics")
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index b33fc02..4492577 100644
+index e959ea0..77ab42c 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
-@@ -629,8 +629,6 @@ impl<'a> Builder<'a> {
+@@ -662,8 +662,6 @@ impl<'a> Builder<'a> {
tool::RemoteTestClient,
tool::RustInstaller,
tool::Cargo,
tool::RustAnalyzerProcMacroSrv,
tool::RustDemangler,
tool::Rustdoc,
-@@ -651,10 +649,6 @@ impl<'a> Builder<'a> {
+@@ -684,10 +682,6 @@ impl<'a> Builder<'a> {
check::CodegenBackend,
check::Clippy,
check::Miri,
check::Rustfmt,
check::Bootstrap
),
-@@ -684,7 +678,6 @@ impl<'a> Builder<'a> {
+@@ -718,7 +712,6 @@ impl<'a> Builder<'a> {
test::ReplacePlaceholderTest,
test::Cargotest,
test::Cargo,
test::ErrorIndex,
test::Distcheck,
test::RunMakeFullDeps,
-@@ -732,11 +725,8 @@ impl<'a> Builder<'a> {
+@@ -767,11 +760,8 @@ impl<'a> Builder<'a> {
doc::RustdocBook,
doc::RustByExample,
doc::RustcBook,
doc::EmbeddedBook,
doc::EditionGuide,
doc::StyleGuide,
-@@ -752,8 +742,6 @@ impl<'a> Builder<'a> {
+@@ -788,8 +778,6 @@ impl<'a> Builder<'a> {
dist::Analysis,
dist::Src,
dist::Cargo,
dist::Rustfmt,
dist::RustDemangler,
dist::Clippy,
-@@ -774,7 +762,6 @@ impl<'a> Builder<'a> {
+@@ -810,7 +798,6 @@ impl<'a> Builder<'a> {
install::Docs,
install::Std,
install::Cargo,
install::Rustfmt,
install::RustDemangler,
install::Clippy,
-@@ -1878,10 +1865,7 @@ impl<'a> Builder<'a> {
+@@ -1949,10 +1936,7 @@ impl<'a> Builder<'a> {
}
}
}
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
-index cc80763..19754a2 100644
+index 9ad98eb..3c6ac96 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -76,7 +76,6 @@ macro_rules! book {
EditionGuide, "src/doc/edition-guide", "edition-guide", submodule;
EmbeddedBook, "src/doc/embedded-book", "embedded-book", submodule;
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
-index b4f1506..27236f3 100644
+index aedf1ec..2ade9c4 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
-@@ -2024,17 +2024,7 @@ impl Step for RustcGuide {
+@@ -2070,17 +2070,7 @@ impl Step for RustcGuide {
}
fn run(self, builder: &Builder<'_>) {
}
diff --git a/src/tools/clippy/Cargo.toml b/src/tools/clippy/Cargo.toml
-index 70d1268..c7c6c3e 100644
+index c35dfcb..a24d2f4 100644
--- a/src/tools/clippy/Cargo.toml
+++ b/src/tools/clippy/Cargo.toml
@@ -36,11 +36,6 @@ walkdir = "2.3"
[package.metadata.rust-analyzer]
diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs
-index bddfdcf..9bac4b7 100644
+index a9eb6c8..2d4f578 100644
--- a/src/tools/tidy/src/deps.rs
+++ b/src/tools/tidy/src/deps.rs
-@@ -333,7 +333,7 @@ const FORBIDDEN_TO_HAVE_DUPLICATES: &[&str] = &[
+@@ -337,7 +337,7 @@ const FORBIDDEN_TO_HAVE_DUPLICATES: &[&str] = &[
// This crate takes quite a long time to build, so don't allow two versions of them
// to accidentally sneak into our dependency graph, in order to ensure we keep our CI times
// under control.
];
/// Dependency checks.
-@@ -609,6 +609,8 @@ fn direct_deps_of<'a>(metadata: &'a Metadata, pkg_id: &'a PackageId) -> Vec<&'a
+@@ -613,6 +613,8 @@ fn direct_deps_of<'a>(metadata: &'a Metadata, pkg_id: &'a PackageId) -> Vec<&'a
}
fn check_rustfix(metadata: &Metadata, bad: &mut bool) {
Comment: Use https://github.com/infinity0/mdBook/tree/debian to help you rebase the patch on top of a newer version. . Make sure the paths here match the ones in debian/rust-doc.links
---
- src/tools/linkchecker/main.rs | 28 ++++++-
- vendor/mdbook/src/book/init.rs | 6 --
- .../src/renderer/html_handlebars/hbs_renderer.rs | 80 ++----------------
- .../mdbook/src/renderer/html_handlebars/search.rs | 2 -
- vendor/mdbook/src/theme/index.hbs | 97 +---------------------
- vendor/mdbook/src/theme/mod.rs | 27 ------
- vendor/mdbook/src/theme/searcher/mod.rs | 2 -
- 7 files changed, 37 insertions(+), 205 deletions(-)
+ src/tools/linkchecker/main.rs | 28 +++++-
+ vendor/mdbook/src/book/init.rs | 19 ----
+ .../src/renderer/html_handlebars/hbs_renderer.rs | 110 ++++-----------------
+ .../mdbook/src/renderer/html_handlebars/search.rs | 2 -
+ vendor/mdbook/src/theme/index.hbs | 99 +------------------
+ vendor/mdbook/src/theme/mod.rs | 27 -----
+ vendor/mdbook/src/theme/searcher/mod.rs | 2 -
+ 7 files changed, 47 insertions(+), 240 deletions(-)
diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs
index 4170c32..d7dcda7 100644
report.links_ignored_exception += 1;
} else {
diff --git a/vendor/mdbook/src/book/init.rs b/vendor/mdbook/src/book/init.rs
-index dd3fa8b..a088517 100644
+index ebcdd93..41dab42 100644
--- a/vendor/mdbook/src/book/init.rs
+++ b/vendor/mdbook/src/book/init.rs
-@@ -152,12 +152,6 @@ impl BookBuilder {
+@@ -153,25 +153,6 @@ impl BookBuilder {
let mut js = File::create(themedir.join("book.js"))?;
js.write_all(theme::JS)?;
-
- let mut highlight_js = File::create(themedir.join("highlight.js"))?;
- highlight_js.write_all(theme::HIGHLIGHT_JS)?;
+-
+- write_file(&themedir.join("fonts"), "fonts.css", theme::fonts::CSS)?;
+- for (file_name, contents) in theme::fonts::LICENSES {
+- write_file(&themedir, file_name, contents)?;
+- }
+- for (file_name, contents) in theme::fonts::OPEN_SANS.iter() {
+- write_file(&themedir, file_name, contents)?;
+- }
+- write_file(
+- &themedir,
+- theme::fonts::SOURCE_CODE_PRO.0,
+- theme::fonts::SOURCE_CODE_PRO.1,
+- )?;
-
Ok(())
}
diff --git a/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs b/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs
-index 1b648da..5fe813c 100644
+index e170e2f..caa2eff 100644
--- a/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs
+++ b/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs
-@@ -3,7 +3,7 @@ use crate::config::{BookConfig, Config, HtmlConfig, Playground, RustEdition};
+@@ -3,13 +3,14 @@ use crate::config::{BookConfig, Config, HtmlConfig, Playground, RustEdition};
use crate::errors::*;
use crate::renderer::html_handlebars::helpers;
use crate::renderer::{RenderContext, Renderer};
use crate::utils;
use std::borrow::Cow;
-@@ -11,6 +11,7 @@ use std::collections::BTreeMap;
+ use std::collections::BTreeMap;
use std::collections::HashMap;
use std::fs::{self, File};
- use std::path::{Path, PathBuf};
+use std::os::unix::fs::symlink;
+ use std::path::{Path, PathBuf};
use crate::utils::fs::get_404_output_file;
- use handlebars::Handlebars;
-@@ -235,80 +236,13 @@ impl HtmlHandlebars {
+@@ -235,105 +236,28 @@ impl HtmlHandlebars {
if let Some(contents) = &theme.favicon_svg {
write_file(destination, "favicon.svg", contents)?;
}
- destination,
- "FontAwesome/fonts/fontawesome-webfont.svg",
- theme::FONT_AWESOME_SVG,
-- )?;
++ symlink(
++ "/usr/share/fonts-font-awesome/css/font-awesome.min.css",
++ destination.join("css/font-awesome.min.css"),
+ )?;
- write_file(
- destination,
- "FontAwesome/fonts/fontawesome-webfont.ttf",
- theme::FONT_AWESOME_TTF,
-- )?;
++ symlink(
++ "/usr/share/fonts-font-awesome/fonts",
++ destination.join("fonts"),
+ )?;
- write_file(
- destination,
- "FontAwesome/fonts/fontawesome-webfont.woff",
- theme::FONT_AWESOME_WOFF,
-- )?;
++ symlink(
++ "/usr/share/javascript/highlight.js/styles/atelier-dune-light.css",
++ destination.join("highlight.css"),
+ )?;
- write_file(
- destination,
- "FontAwesome/fonts/fontawesome-webfont.woff2",
- theme::FONT_AWESOME_WOFF2,
-- )?;
++ symlink(
++ "/usr/share/javascript/highlight.js/highlight.js",
++ destination.join("highlight.js"),
+ )?;
- write_file(
- destination,
- "FontAwesome/fonts/FontAwesome.ttf",
- theme::FONT_AWESOME_TTF,
-- )?;
++ symlink(
++ "/usr/share/javascript/mathjax/MathJax.js",
++ destination.join("MathJax.js"),
+ )?;
- if html_config.copy_fonts {
- write_file(destination, "fonts/fonts.css", theme::fonts::CSS)?;
- for (file_name, contents) in theme::fonts::LICENSES.iter() {
- theme::fonts::SOURCE_CODE_PRO.1,
- )?;
- }
+- if let Some(fonts_css) = &theme.fonts_css {
+- if !fonts_css.is_empty() {
+- if html_config.copy_fonts {
+- warn!(
+- "output.html.copy_fonts is deprecated.\n\
+- Set copy_fonts=false and ensure the fonts you want are in \
+- the `theme/fonts/` directory."
+- );
+- }
+- write_file(destination, "fonts/fonts.css", &fonts_css)?;
+- }
+- }
+- if !html_config.copy_fonts && theme.fonts_css.is_none() {
+- warn!(
+- "output.html.copy_fonts is deprecated.\n\
+- This book appears to have copy_fonts=false without a fonts.css file.\n\
+- Add an empty `theme/fonts/fonts.css` file to squelch this warning."
+- );
+- }
+- for font_file in &theme.font_files {
+- let contents = fs::read(font_file)?;
+- let filename = font_file.file_name().unwrap();
+- let filename = Path::new("fonts").join(filename);
+- write_file(destination, filename, &contents)?;
+- }
-
- let playground_config = &html_config.playground;
-
- playground_editor::THEME_TOMORROW_NIGHT_JS,
- )?;
- }
-+ symlink("/usr/share/fonts-font-awesome/css/font-awesome.min.css", destination.join("css/font-awesome.min.css"))?;
-+ symlink("/usr/share/fonts-font-awesome/fonts", destination.join("fonts"))?;
-+ symlink("/usr/share/javascript/highlight.js/styles/atelier-dune-light.css", destination.join("highlight.css"))?;
-+ symlink("/usr/share/javascript/highlight.js/highlight.js", destination.join("highlight.js"))?;
-+ symlink("/usr/share/javascript/mathjax/MathJax.js", destination.join("MathJax.js"))?;
Ok(())
}
}
diff --git a/vendor/mdbook/src/theme/index.hbs b/vendor/mdbook/src/theme/index.hbs
-index 147eb9a..27d358b 100644
+index 6f3948c..7e5c54c 100644
--- a/vendor/mdbook/src/theme/index.hbs
+++ b/vendor/mdbook/src/theme/index.hbs
@@ -33,10 +33,7 @@
{{/if}}
</head>
<body>
-@@ -60,46 +57,6 @@
+@@ -61,48 +58,6 @@
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
</script>
- <!-- Hide / unhide sidebar before it is displayed -->
- <script>
- var html = document.querySelector('html');
-- var sidebar = 'hidden';
+- var sidebar = null;
- if (document.body.clientWidth >= 1080) {
- try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
- sidebar = sidebar || 'visible';
+- } else {
+- sidebar = 'hidden';
- }
- html.classList.remove('sidebar-visible');
- html.classList.add("sidebar-" + sidebar);
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
{{#toc}}{{/toc}}
-@@ -237,54 +194,8 @@
+@@ -240,54 +195,8 @@
</script>
{{/if}}
<!-- Custom JS scripts -->
{{#each additional_js}}
diff --git a/vendor/mdbook/src/theme/mod.rs b/vendor/mdbook/src/theme/mod.rs
-index 7af5e2b..3086fcf 100644
+index 6e6b509..ef8886b 100644
--- a/vendor/mdbook/src/theme/mod.rs
+++ b/vendor/mdbook/src/theme/mod.rs
@@ -1,9 +1,5 @@
/// The `Theme` struct should be used instead of the static variables because
/// the `new()` method will look if the user has a theme directory in their
-@@ -57,11 +42,8 @@ pub struct Theme {
+@@ -59,11 +44,8 @@ pub struct Theme {
pub favicon_png: Option<Vec<u8>>,
pub favicon_svg: Option<Vec<u8>>,
pub js: Vec<u8>,
}
impl Theme {
-@@ -91,9 +73,6 @@ impl Theme {
+@@ -93,9 +75,6 @@ impl Theme {
theme_dir.join("css/variables.css"),
&mut theme.variables_css,
),
(
theme_dir.join("tomorrow-night.css"),
&mut theme.tomorrow_night_css,
-@@ -156,11 +135,8 @@ impl Default for Theme {
+@@ -183,11 +162,8 @@ impl Default for Theme {
favicon_png: Some(FAVICON_PNG.to_owned()),
favicon_svg: Some(FAVICON_SVG.to_owned()),
js: JS.to_owned(),
}
}
}
-@@ -243,11 +219,8 @@ mod tests {
+@@ -273,11 +249,8 @@ mod tests {
favicon_png: Some(Vec::new()),
favicon_svg: Some(Vec::new()),
js: Vec::new(),