From 2bf5f77696504d86426162364a1e2f9ef8c29f02 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Mon, 17 Apr 2023 11:00:10 +0200 Subject: [PATCH] treat the dev channel as nightly in compiletest --- src/tools/compiletest/src/header/cfg.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/compiletest/src/header/cfg.rs b/src/tools/compiletest/src/header/cfg.rs index a9694d4d52c88..86a749b935d82 100644 --- a/src/tools/compiletest/src/header/cfg.rs +++ b/src/tools/compiletest/src/header/cfg.rs @@ -165,11 +165,15 @@ pub(super) fn parse_cfg_name_directive<'a>( message: "when the architecture is part of the Thumb family" } + // Technically the locally built compiler uses the "dev" channel rather than the "nightly" + // channel, even though most people don't know or won't care about it. To avoid confusion, we + // treat the "dev" channel as the "nightly" channel when processing the directive. condition! { - name: &config.channel, + name: if config.channel == "dev" { "nightly" } else { &config.channel }, allowed_names: &["stable", "beta", "nightly"], message: "when the release channel is {name}", } + condition! { name: "cross-compile", condition: config.target != config.host,