@@ -1684,6 +1684,14 @@ impl Config {
1684
1684
let mut lld_enabled = None ;
1685
1685
let mut std_features = None ;
1686
1686
1687
+ let is_user_configured_rust_channel =
1688
+ if let Some ( channel) = toml. rust . as_ref ( ) . and_then ( |r| r. channel . clone ( ) ) {
1689
+ config. channel = channel;
1690
+ true
1691
+ } else {
1692
+ false
1693
+ } ;
1694
+
1687
1695
let default = config. channel == "dev" ;
1688
1696
config. omit_git_hash = toml. rust . as_ref ( ) . and_then ( |r| r. omit_git_hash ) . unwrap_or ( default) ;
1689
1697
@@ -1701,8 +1709,6 @@ impl Config {
1701
1709
config. in_tree_llvm_info = GitInfo :: new ( false , & config. src . join ( "src/llvm-project" ) ) ;
1702
1710
config. in_tree_gcc_info = GitInfo :: new ( false , & config. src . join ( "src/gcc" ) ) ;
1703
1711
1704
- let mut is_user_configured_rust_channel = false ;
1705
-
1706
1712
if let Some ( rust) = toml. rust {
1707
1713
let Rust {
1708
1714
optimize : optimize_toml,
@@ -1724,7 +1730,7 @@ impl Config {
1724
1730
parallel_compiler,
1725
1731
randomize_layout,
1726
1732
default_linker,
1727
- channel,
1733
+ channel : _ , // already handled above
1728
1734
description,
1729
1735
musl_root,
1730
1736
rpath,
@@ -1761,9 +1767,6 @@ impl Config {
1761
1767
std_features : std_features_toml,
1762
1768
} = rust;
1763
1769
1764
- is_user_configured_rust_channel = channel. is_some ( ) ;
1765
- set ( & mut config. channel , channel. clone ( ) ) ;
1766
-
1767
1770
config. download_rustc_commit =
1768
1771
config. download_ci_rustc_commit ( download_rustc, config. llvm_assertions ) ;
1769
1772
0 commit comments