Skip to content

Commit 48f3c62

Browse files
committed
fix Builder::doc_rust_lang_org_channel
Previously, we were unable to use `rust.download-rustc` with the beta or stable channel settings through `rust.channel` due to breaking rustdoc UI tests. This was because when using a precompiled nightly compiler from CI, we must use the channel of precompiled compiler (which is nightly) and ignore `rust.channel` from the configuration. This change addresses that issue in `Builder::doc_rust_lang_org_channel` and allows rustdoc UI tests to work with the precompiled compiler even if the channel specified in config.toml is "beta" or "stable". Signed-off-by: onur-ozkan <[email protected]>
1 parent 16e8803 commit 48f3c62

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bootstrap/src/core/builder.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,10 @@ impl<'a> Builder<'a> {
10391039

10401040
pub fn doc_rust_lang_org_channel(&self) -> String {
10411041
let channel = match &*self.config.channel {
1042+
// When using precompiled nightly compiler from CI, we need to use CI rustc's channel and
1043+
// ignore `rust.channel` from the configuration. Otherwise most of the rustdoc tests will fail
1044+
// due to incompatible `DOC_RUST_LANG_ORG_CHANNEL`.
1045+
_ if self.download_rustc() => "nightly",
10421046
"stable" => &self.version,
10431047
"beta" => "beta",
10441048
"nightly" | "dev" => "nightly",

0 commit comments

Comments
 (0)