@@ -1684,6 +1684,14 @@ impl Config {
16841684 let mut lld_enabled = None ;
16851685 let mut std_features = None ;
16861686
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+
16871695 let default = config. channel == "dev" ;
16881696 config. omit_git_hash = toml. rust . as_ref ( ) . and_then ( |r| r. omit_git_hash ) . unwrap_or ( default) ;
16891697
@@ -1701,8 +1709,6 @@ impl Config {
17011709 config. in_tree_llvm_info = GitInfo :: new ( false , & config. src . join ( "src/llvm-project" ) ) ;
17021710 config. in_tree_gcc_info = GitInfo :: new ( false , & config. src . join ( "src/gcc" ) ) ;
17031711
1704- let mut is_user_configured_rust_channel = false ;
1705-
17061712 if let Some ( rust) = toml. rust {
17071713 let Rust {
17081714 optimize : optimize_toml,
@@ -1724,7 +1730,7 @@ impl Config {
17241730 parallel_compiler,
17251731 randomize_layout,
17261732 default_linker,
1727- channel,
1733+ channel : _ , // already handled above
17281734 description,
17291735 musl_root,
17301736 rpath,
@@ -1761,9 +1767,6 @@ impl Config {
17611767 std_features : std_features_toml,
17621768 } = rust;
17631769
1764- is_user_configured_rust_channel = channel. is_some ( ) ;
1765- set ( & mut config. channel , channel. clone ( ) ) ;
1766-
17671770 config. download_rustc_commit =
17681771 config. download_ci_rustc_commit ( download_rustc, config. llvm_assertions ) ;
17691772
0 commit comments