diff options
| author | bors <bors@rust-lang.org> | 2024-05-17 06:40:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-05-17 06:40:23 +0000 |
| commit | 1189851eebdf6b69b164bbb7bf9df91188ae03aa (patch) | |
| tree | 45dfc7d3101e8fba6b9a422bf0b1d04ba639878a /src | |
| parent | 8af67ba01a1b1d95ff375b645ef5a395d3249e09 (diff) | |
| parent | 3695449a89ecf9f9b6b657ecc4e32b4cda3cf1b6 (diff) | |
Auto merge of #125203 - matthiaskrgr:rollup-5pv7drz, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #123694 (expand: fix minor diagnostics bug) - #125171 (Rename `flatten(_mut)` → `as_flattened(_mut)`) - #125181 (set `rust.channel` properly in source tarballs) - #125186 (Remove duplicate word from addr docs) - #125191 (Report better WF obligation leaf obligations in new solver) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/src/core/config/config.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 8713eb304d2..19119a073c5 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -1307,6 +1307,9 @@ impl Config { toml_path = config.src.join(toml_path); } + let file_content = t!(fs::read_to_string(config.src.join("src/ci/channel"))); + let ci_channel = file_content.trim_end(); + // Give a hard error if `--config` or `RUST_BOOTSTRAP_CONFIG` are set to a missing path, // but not if `config.toml` hasn't been created. let mut toml = if !using_default_path || toml_path.exists() { @@ -1534,6 +1537,7 @@ impl Config { let mut omit_git_hash = None; let mut lld_enabled = None; + let mut is_user_configured_rust_channel = false; if let Some(rust) = toml.rust { let Rust { optimize: optimize_toml, @@ -1591,6 +1595,7 @@ impl Config { lld_mode, } = rust; + is_user_configured_rust_channel = channel.is_some(); set(&mut config.channel, channel); config.download_rustc_commit = config.download_ci_rustc_commit(download_rustc); @@ -1598,8 +1603,6 @@ impl Config { if config.download_rustc_commit.is_some() { // We need the channel used by the downloaded compiler to match the one we set for rustdoc; // otherwise rustdoc-ui tests break. - let ci_channel = t!(fs::read_to_string(config.src.join("src/ci/channel"))); - let ci_channel = ci_channel.trim_end(); if config.channel != ci_channel && !(config.channel == "dev" && ci_channel == "nightly") { @@ -1717,6 +1720,10 @@ impl Config { config.omit_git_hash = omit_git_hash.unwrap_or(default); config.rust_info = GitInfo::new(config.omit_git_hash, &config.src); + if config.rust_info.is_from_tarball() && !is_user_configured_rust_channel { + ci_channel.clone_into(&mut config.channel); + } + if let Some(llvm) = toml.llvm { let Llvm { optimize: optimize_toml, |
