@@ -1668,6 +1668,14 @@ impl Config {
1668
1668
let mut lld_enabled = None ;
1669
1669
let mut std_features = None ;
1670
1670
1671
+ let is_user_configured_rust_channel =
1672
+ if let Some ( channel) = toml. rust . as_ref ( ) . and_then ( |r| r. channel . clone ( ) ) {
1673
+ config. channel = channel;
1674
+ true
1675
+ } else {
1676
+ false
1677
+ } ;
1678
+
1671
1679
let default = config. channel == "dev" ;
1672
1680
config. omit_git_hash = toml. rust . as_ref ( ) . and_then ( |r| r. omit_git_hash ) . unwrap_or ( default) ;
1673
1681
@@ -1685,8 +1693,6 @@ impl Config {
1685
1693
config. in_tree_llvm_info = GitInfo :: new ( false , & config. src . join ( "src/llvm-project" ) ) ;
1686
1694
config. in_tree_gcc_info = GitInfo :: new ( false , & config. src . join ( "src/gcc" ) ) ;
1687
1695
1688
- let mut is_user_configured_rust_channel = false ;
1689
-
1690
1696
if let Some ( rust) = toml. rust {
1691
1697
let Rust {
1692
1698
optimize : optimize_toml,
@@ -1708,7 +1714,7 @@ impl Config {
1708
1714
parallel_compiler,
1709
1715
randomize_layout,
1710
1716
default_linker,
1711
- channel,
1717
+ channel : _ , // already handled above
1712
1718
description,
1713
1719
musl_root,
1714
1720
rpath,
@@ -1745,9 +1751,6 @@ impl Config {
1745
1751
std_features : std_features_toml,
1746
1752
} = rust;
1747
1753
1748
- is_user_configured_rust_channel = channel. is_some ( ) ;
1749
- set ( & mut config. channel , channel. clone ( ) ) ;
1750
-
1751
1754
config. download_rustc_commit =
1752
1755
config. download_ci_rustc_commit ( download_rustc, config. llvm_assertions ) ;
1753
1756
0 commit comments