@@ -106,7 +106,7 @@ enum DownloadSource {
106
106
/// Functions that are only ever called once, but named for clarity and to avoid thousand-line functions.
107
107
impl Config {
108
108
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" ) ) ;
110
110
111
111
let date = & self . stage0_metadata . compiler . date ;
112
112
let version = & self . stage0_metadata . compiler . version ;
@@ -151,7 +151,9 @@ impl Config {
151
151
}
152
152
153
153
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
+ } ) ;
155
157
156
158
let version = self . artifact_version_part ( commit) ;
157
159
// 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 {
258
260
let llvm_root = self . ci_llvm_root ( ) ;
259
261
let llvm_freshness =
260
262
detect_llvm_freshness ( self , self . rust_info . is_managed_git_subrepository ( ) ) ;
261
- self . verbose ( || {
263
+ self . do_if_verbose ( || {
262
264
eprintln ! ( "LLVM freshness: {llvm_freshness:?}" ) ;
263
265
} ) ;
264
266
let llvm_sha = match llvm_freshness {
@@ -557,7 +559,7 @@ pub(crate) fn download_beta_toolchain<'a>(dwn_ctx: impl AsRef<DownloadContext<'a
557
559
#[ cfg( not( test) ) ]
558
560
pub ( crate ) fn download_beta_toolchain < ' a > ( dwn_ctx : impl AsRef < DownloadContext < ' a > > , out : & Path ) {
559
561
let dwn_ctx = dwn_ctx. as_ref ( ) ;
560
- dwn_ctx. exec_ctx . verbose ( || {
562
+ dwn_ctx. exec_ctx . do_if_verbose ( || {
561
563
println ! ( "downloading stage0 beta artifacts" ) ;
562
564
} ) ;
563
565
@@ -812,7 +814,7 @@ fn download_component<'a>(
812
814
unpack ( dwn_ctx. exec_ctx , & tarball, & bin_root, prefix) ;
813
815
return ;
814
816
} else {
815
- dwn_ctx. exec_ctx . verbose ( || {
817
+ dwn_ctx. exec_ctx . do_if_verbose ( || {
816
818
println ! (
817
819
"ignoring cached file {} due to failed verification" ,
818
820
tarball. display( )
@@ -853,7 +855,7 @@ download-rustc = false
853
855
pub ( crate ) fn verify ( exec_ctx : & ExecutionContext , path : & Path , expected : & str ) -> bool {
854
856
use sha2:: Digest ;
855
857
856
- exec_ctx. verbose ( || {
858
+ exec_ctx. do_if_verbose ( || {
857
859
println ! ( "verifying {}" , path. display( ) ) ;
858
860
} ) ;
859
861
@@ -934,7 +936,7 @@ fn unpack(exec_ctx: &ExecutionContext, tarball: &Path, dst: &Path, pattern: &str
934
936
short_path = short_path. strip_prefix ( pattern) . unwrap_or ( short_path) ;
935
937
let dst_path = dst. join ( short_path) ;
936
938
937
- exec_ctx. verbose ( || {
939
+ exec_ctx. do_if_verbose ( || {
938
940
println ! ( "extracting {} to {}" , original_path. display( ) , dst. display( ) ) ;
939
941
} ) ;
940
942
@@ -965,7 +967,7 @@ fn download_file<'a>(
965
967
) {
966
968
let dwn_ctx = dwn_ctx. as_ref ( ) ;
967
969
968
- dwn_ctx. exec_ctx . verbose ( || {
970
+ dwn_ctx. exec_ctx . do_if_verbose ( || {
969
971
println ! ( "download {url}" ) ;
970
972
} ) ;
971
973
// Use a temporary file in case we crash while downloading, to avoid a corrupt download in cache/.
0 commit comments