Skip to content

Commit

Permalink
Auto merge of #5613 - oli-obk:master, r=matklad
Browse files Browse the repository at this point in the history
Allow rustc bootstrap to use unstable features even though it's using a beta-cargo

This is the sane alternative to rust-lang/rust#51322 (comment)

cc @kennytm
  • Loading branch information
bors committed Jun 6, 2018
2 parents d33c65c + 1bdb89d commit 946ab00
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/cargo/core/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,18 @@ impl CliUnstable {
}

fn channel() -> String {
env::var("__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS").unwrap_or_else(|_| {
::version()
.cfg_info
.map(|c| c.release_channel)
.unwrap_or_else(|| String::from("dev"))
})
if let Ok(override_channel) = env::var("__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS") {
return override_channel;
}
if let Ok(staging) = env::var("RUSTC_BOOTSTRAP") {
if staging == "1" {
return "dev".to_string();
}
}
::version()
.cfg_info
.map(|c| c.release_channel)
.unwrap_or_else(|| String::from("dev"))
}

fn nightly_features_allowed() -> bool {
Expand Down

0 comments on commit 946ab00

Please sign in to comment.