Skip to content

Commit de397ee

Browse files
committed
Don't warn when toolchain version is explicitly provided.
1 parent 403bcbd commit de397ee

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changes/1160.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "changed",
3+
"description": "don't warn when toolchain version is explicitly provided.",
4+
"issues": [1148]
5+
}

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ To override the toolchain mounted in the image, set `target.{}.image.toolchain =
568568
let image = image.to_definite_with(&engine, msg_info);
569569

570570
toolchain.replace_host(&image.platform);
571+
let maybe_warn = matches!(toolchain.channel.as_str(), "stable" | "beta" | "nightly");
571572

572573
if image.platform.target.is_supported(Some(&target)) {
573574
if image.platform.architecture != toolchain.host().architecture {
@@ -597,7 +598,7 @@ To override the toolchain mounted in the image, set `target.{}.image.toolchain =
597598

598599
let mut rustc_version = None;
599600
if let Some((version, channel, commit)) = toolchain.rustc_version()? {
600-
if toolchain.date.is_none() {
601+
if maybe_warn && toolchain.date.is_none() {
601602
warn_host_version_mismatch(
602603
&host_version_meta,
603604
&toolchain,

0 commit comments

Comments
 (0)