]> git.proxmox.com Git - rustc.git/commitdiff
Update early-stage patches for 1.70.0+dfsg1
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 13 Sep 2023 12:14:28 +0000 (14:14 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 13 Sep 2023 12:14:29 +0000 (14:14 +0200)
debian/patches/d-0000-ignore-removed-submodules.patch
debian/patches/d-0002-mdbook-strip-embedded-libs.patch
debian/patches/d-0004-clippy-feature-sync.patch

index 2f1c323c36b9c74cfc2fcb02e90c6c8e437212f4..54e14552471014e4d7e935736d6289912bbcef7d 100644 (file)
@@ -15,7 +15,7 @@ Subject: d-0000-ignore-removed-submodules
  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 = [
@@ -48,7 +48,7 @@ index 15cbb26..c012319 100644
    "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]
@@ -59,10 +59,10 @@ index 15cbb26..c012319 100644
  # 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))
@@ -74,10 +74,10 @@ index 013d1ab..f6fd37b 100644
              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,
@@ -86,7 +86,7 @@ index b33fc02..4492577 100644
                  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,
@@ -97,7 +97,7 @@ index b33fc02..4492577 100644
                  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,
@@ -105,7 +105,7 @@ index b33fc02..4492577 100644
                  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,
@@ -117,7 +117,7 @@ index b33fc02..4492577 100644
                  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,
@@ -126,7 +126,7 @@ index b33fc02..4492577 100644
                  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,
@@ -134,7 +134,7 @@ index b33fc02..4492577 100644
                  install::Rustfmt,
                  install::RustDemangler,
                  install::Clippy,
-@@ -1878,10 +1865,7 @@ impl<'a> Builder<'a> {
+@@ -1949,10 +1936,7 @@ impl<'a> Builder<'a> {
              }
          }
  
@@ -147,7 +147,7 @@ index b33fc02..4492577 100644
          }
  
 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 {
@@ -159,10 +159,10 @@ index cc80763..19754a2 100644
      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<'_>) {
@@ -182,7 +182,7 @@ index b4f1506..27236f3 100644
  }
  
 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"
@@ -234,10 +234,10 @@ index 87ce59d..12ed654 100644
  
  [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.
@@ -246,7 +246,7 @@ index bddfdcf..9bac4b7 100644
  ];
  
  /// 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) {
index cd17dc2e6bf215e6b65c0254ec269d6f07bf743e..81a0e2792e44414ab0314e277157f644c33afe49 100644 (file)
@@ -4,14 +4,14 @@ Subject: d-0002-mdbook-strip-embedded-libs
 
 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                     |  --
- .../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
@@ -67,10 +67,10 @@ 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)?;
  
@@ -79,15 +79,28 @@ index dd3fa8b..a088517 100644
 -
 -        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};
@@ -96,15 +109,14 @@ index 1b648da..5fe813c 100644
  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)?;
          }
@@ -127,27 +139,42 @@ index 1b648da..5fe813c 100644
 -            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() {
@@ -162,6 +189,31 @@ index 1b648da..5fe813c 100644
 -                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;
 -
@@ -182,11 +234,6 @@ index 1b648da..5fe813c 100644
 -                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(())
      }
@@ -204,7 +251,7 @@ index a9e2f5c..3e3f69c 100644
      }
  
 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 @@
@@ -228,7 +275,7 @@ index 147eb9a..27d358b 100644
          {{/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>
  
@@ -263,10 +310,12 @@ index 147eb9a..27d358b 100644
 -        <!-- 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);
@@ -275,7 +324,7 @@ index 147eb9a..27d358b 100644
          <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}}
  
@@ -333,7 +382,7 @@ index 147eb9a..27d358b 100644
          <!-- 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 @@
@@ -366,7 +415,7 @@ index 7af5e2b..3086fcf 100644
  
  /// 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>,
@@ -378,7 +427,7 @@ index 7af5e2b..3086fcf 100644
  }
  
  impl Theme {
-@@ -91,9 +73,6 @@ impl Theme {
+@@ -93,9 +75,6 @@ impl Theme {
                      theme_dir.join("css/variables.css"),
                      &mut theme.variables_css,
                  ),
@@ -388,7 +437,7 @@ index 7af5e2b..3086fcf 100644
                  (
                      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(),
@@ -400,7 +449,7 @@ index 7af5e2b..3086fcf 100644
          }
      }
  }
-@@ -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(),
index 23667ffded500a8934d1ea68496711d453a6d1ff..f4a863a8e24b21689ffb0e2d1cff0c90ce349e0e 100644 (file)
@@ -10,7 +10,7 @@ this is what rustc_workspace_hack does in the upstream build.
  2 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/src/tools/clippy/Cargo.toml b/src/tools/clippy/Cargo.toml
-index c7c6c3e..7e453c7 100644
+index a24d2f4..3681c85 100644
 --- a/src/tools/clippy/Cargo.toml
 +++ b/src/tools/clippy/Cargo.toml
 @@ -44,7 +44,7 @@ if_chain = "1.0"