diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index e6d5171eaf95..9028c7aec364 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -735,23 +735,23 @@ impl Config { ); } - let mut dwn_ctx = DownloadContext::new( - path_modification_cache.clone(), - &src, - rust_info.clone(), - &submodules, - download_rustc_commit.clone(), + let mut dwn_ctx = DownloadContext { + path_modification_cache: path_modification_cache.clone(), + src: &src, + rust_info: rust_info.clone(), + submodules: &submodules, + download_rustc_commit: download_rustc_commit.clone(), host_target, llvm_from_ci, - target_config.clone(), - out.clone(), + target_config: target_config.clone(), + out: out.clone(), patch_binaries_for_nix, - &exec_ctx, - &stage0_metadata, + exec_ctx: &exec_ctx, + stage0_metadata: &stage0_metadata, llvm_assertions, - &bootstrap_cache_path, + bootstrap_cache_path: &bootstrap_cache_path, is_running_on_ci, - ); + }; let initial_rustc = build_rustc.unwrap_or_else(|| { download_beta_toolchain(&dwn_ctx); diff --git a/src/bootstrap/src/core/download.rs b/src/bootstrap/src/core/download.rs index 29a244a6c408..402d6019dabb 100644 --- a/src/bootstrap/src/core/download.rs +++ b/src/bootstrap/src/core/download.rs @@ -418,45 +418,6 @@ pub(crate) struct DownloadContext<'a> { pub is_running_on_ci: bool, } -impl<'a> DownloadContext<'a> { - #[allow(clippy::too_many_arguments)] - pub fn new( - path_modification_cache: Arc, PathFreshness>>>, - src: &'a Path, - rust_info: channel::GitInfo, - submodules: &'a Option, - download_rustc_commit: Option, - host_target: TargetSelection, - llvm_from_ci: bool, - target_config: HashMap, - out: PathBuf, - patch_binaries_for_nix: Option, - exec_ctx: &'a ExecutionContext, - stage0_metadata: &'a build_helper::stage0_parser::Stage0, - llvm_assertions: bool, - bootstrap_cache_path: &'a Option, - is_running_on_ci: bool, - ) -> Self { - Self { - path_modification_cache, - src, - rust_info, - submodules, - download_rustc_commit, - host_target, - llvm_from_ci, - target_config, - out, - patch_binaries_for_nix, - exec_ctx, - stage0_metadata, - llvm_assertions, - bootstrap_cache_path, - is_running_on_ci, - } - } -} - impl<'a> AsRef> for DownloadContext<'a> { fn as_ref(&self) -> &DownloadContext<'a> { self