@@ -106,7 +106,7 @@ enum DownloadSource {
106106/// Functions that are only ever called once, but named for clarity and to avoid thousand-line functions. 
107107impl  Config  { 
108108    pub ( crate )  fn  download_clippy ( & self )  -> PathBuf  { 
109-         self . verbose ( || println ! ( "downloading stage0 clippy artifacts" ) ) ; 
109+         self . do_if_verbose ( || println ! ( "downloading stage0 clippy artifacts" ) ) ; 
110110
111111        let  date = & self . stage0_metadata . compiler . date ; 
112112        let  version = & self . stage0_metadata . compiler . version ; 
@@ -151,7 +151,9 @@ impl Config {
151151    } 
152152
153153    pub ( crate )  fn  download_ci_rustc ( & self ,  commit :  & str )  { 
154-         self . verbose ( || println ! ( "using downloaded stage2 artifacts from CI (commit {commit})" ) ) ; 
154+         self . do_if_verbose ( || { 
155+             println ! ( "using downloaded stage2 artifacts from CI (commit {commit})" ) 
156+         } ) ; 
155157
156158        let  version = self . artifact_version_part ( commit) ; 
157159        // download-rustc doesn't need its own cargo, it can just use beta's. But it does need the 
@@ -258,7 +260,7 @@ impl Config {
258260        let  llvm_root = self . ci_llvm_root ( ) ; 
259261        let  llvm_freshness =
260262            detect_llvm_freshness ( self ,  self . rust_info . is_managed_git_subrepository ( ) ) ; 
261-         self . verbose ( || { 
263+         self . do_if_verbose ( || { 
262264            eprintln ! ( "LLVM freshness: {llvm_freshness:?}" ) ; 
263265        } ) ; 
264266        let  llvm_sha = match  llvm_freshness { 
@@ -557,7 +559,7 @@ pub(crate) fn download_beta_toolchain<'a>(dwn_ctx: impl AsRef<DownloadContext<'a
557559#[ cfg( not( test) ) ]  
558560pub ( crate )  fn  download_beta_toolchain < ' a > ( dwn_ctx :  impl  AsRef < DownloadContext < ' a > > ,  out :  & Path )  { 
559561    let  dwn_ctx = dwn_ctx. as_ref ( ) ; 
560-     dwn_ctx. exec_ctx . verbose ( || { 
562+     dwn_ctx. exec_ctx . do_if_verbose ( || { 
561563        println ! ( "downloading stage0 beta artifacts" ) ; 
562564    } ) ; 
563565
@@ -812,7 +814,7 @@ fn download_component<'a>(
812814                unpack ( dwn_ctx. exec_ctx ,  & tarball,  & bin_root,  prefix) ; 
813815                return ; 
814816            }  else  { 
815-                 dwn_ctx. exec_ctx . verbose ( || { 
817+                 dwn_ctx. exec_ctx . do_if_verbose ( || { 
816818                    println ! ( 
817819                        "ignoring cached file {} due to failed verification" , 
818820                        tarball. display( ) 
@@ -853,7 +855,7 @@ download-rustc = false
853855pub ( crate )  fn  verify ( exec_ctx :  & ExecutionContext ,  path :  & Path ,  expected :  & str )  -> bool  { 
854856    use  sha2:: Digest ; 
855857
856-     exec_ctx. verbose ( || { 
858+     exec_ctx. do_if_verbose ( || { 
857859        println ! ( "verifying {}" ,  path. display( ) ) ; 
858860    } ) ; 
859861
@@ -934,7 +936,7 @@ fn unpack(exec_ctx: &ExecutionContext, tarball: &Path, dst: &Path, pattern: &str
934936        short_path = short_path. strip_prefix ( pattern) . unwrap_or ( short_path) ; 
935937        let  dst_path = dst. join ( short_path) ; 
936938
937-         exec_ctx. verbose ( || { 
939+         exec_ctx. do_if_verbose ( || { 
938940            println ! ( "extracting {} to {}" ,  original_path. display( ) ,  dst. display( ) ) ; 
939941        } ) ; 
940942
@@ -965,7 +967,7 @@ fn download_file<'a>(
965967)  { 
966968    let  dwn_ctx = dwn_ctx. as_ref ( ) ; 
967969
968-     dwn_ctx. exec_ctx . verbose ( || { 
970+     dwn_ctx. exec_ctx . do_if_verbose ( || { 
969971        println ! ( "download {url}" ) ; 
970972    } ) ; 
971973    // Use a temporary file in case we crash while downloading, to avoid a corrupt download in cache/. 
0 commit comments