diff options
| author | bors <bors@rust-lang.org> | 2022-11-02 14:35:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-02 14:35:54 +0000 |
| commit | 897e37553bba8b42751c67658967889d11ecd120 (patch) | |
| tree | aa32c4b4e49c517ab2a0bdbc845fcdb0ac2ad617 /src/bootstrap/config.rs | |
| parent | d939e5a3e5eb34dd1e828b9ad244ee6e6a0a989b (diff) | |
| parent | 3100c850b0b33cd65e066b91e0a898ff1d633bc7 (diff) | |
| download | rust-1.65.0.tar.gz rust-1.65.0.zip | |
Auto merge of #103859 - Mark-Simulacrum:stable-next, r=flip1995 1.65.0
[stable] Lower lint level for READ_ZERO_BYTE_VEC This avoids reporting false-positives; see rust-lang/rust-clippy#9274 for details. cc `@rust-lang/clippy` -- do we want a direct change landed on stable here? If so, please r+ this PR, otherwise we can just close it. Would appreciate confirmation this is the right change to make as well. cc `@joshtriplett` -- filing due to https://rust-lang.zulipchat.com/#narrow/stream/301329-t-devtools/topic/clippy.20false.20positive
Diffstat (limited to 'src/bootstrap/config.rs')
| -rw-r--r-- | src/bootstrap/config.rs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 7c062460c4f..f1a150e0f24 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -1280,11 +1280,21 @@ impl Config { git } - pub(crate) fn artifact_channel(&self, commit: &str) -> String { + pub(crate) fn artifact_version_part(&self, commit: &str) -> String { let mut channel = self.git(); channel.arg("show").arg(format!("{}:src/ci/channel", commit)); let channel = output(&mut channel); - channel.trim().to_owned() + + let mut version = self.git(); + version.arg("show").arg(format!("{}:src/version", commit)); + let version = output(&mut version); + + match channel.trim() { + "stable" => version.trim().to_owned(), + "beta" => channel.trim().to_owned(), + "nightly" => channel.trim().to_owned(), + other => unreachable!("{:?} is not recognized as a valid channel", other), + } } /// Try to find the relative path of `bindir`, otherwise return it in full. @@ -1526,7 +1536,7 @@ fn maybe_download_rustfmt(builder: &Builder<'_>) -> Option<PathBuf> { fn download_ci_rustc(builder: &Builder<'_>, commit: &str) { builder.verbose(&format!("using downloaded stage2 artifacts from CI (commit {commit})")); - let channel = builder.config.artifact_channel(commit); + let version = builder.config.artifact_version_part(commit); let host = builder.config.build.triple; let bin_root = builder.out.join(host).join("ci-rustc"); let rustc_stamp = bin_root.join(".rustc-stamp"); @@ -1535,13 +1545,13 @@ fn download_ci_rustc(builder: &Builder<'_>, commit: &str) { if bin_root.exists() { t!(fs::remove_dir_all(&bin_root)); } - let filename = format!("rust-std-{channel}-{host}.tar.xz"); + let filename = format!("rust-std-{version}-{host}.tar.xz"); let pattern = format!("rust-std-{host}"); download_ci_component(builder, filename, &pattern, commit); - let filename = format!("rustc-{channel}-{host}.tar.xz"); + let filename = format!("rustc-{version}-{host}.tar.xz"); download_ci_component(builder, filename, "rustc", commit); // download-rustc doesn't need its own cargo, it can just use beta's. - let filename = format!("rustc-dev-{channel}-{host}.tar.xz"); + let filename = format!("rustc-dev-{version}-{host}.tar.xz"); download_ci_component(builder, filename, "rustc-dev", commit); builder.fix_bin_or_dylib(&bin_root.join("bin").join("rustc")); |
