Skip to content

Commit 1bdb89d

Browse files
authored
Order can be important if cargo tests are run inside the rustc build system
1 parent ac3cac4 commit 1bdb89d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cargo/core/features.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -354,14 +354,14 @@ impl CliUnstable {
354354
}
355355

356356
fn channel() -> String {
357+
if let Ok(override_channel) = env::var("__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS") {
358+
return override_channel;
359+
}
357360
if let Ok(staging) = env::var("RUSTC_BOOTSTRAP") {
358361
if staging == "1" {
359362
return "dev".to_string();
360363
}
361364
}
362-
if let Ok(override_channel) = env::var("__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS") {
363-
return override_channel;
364-
}
365365
::version()
366366
.cfg_info
367367
.map(|c| c.release_channel)

0 commit comments

Comments
 (0)