Rollup merge of #131061 - onur-ozkan:verbose-checks, r=Kobzol
replace manual verbose checks with `Config::is_verbose` self-explanatory
This commit is contained in:
commit
5ba81d723a
@ -1564,8 +1564,8 @@ fn cargo(
|
||||
let libdir = self.rustc_libdir(compiler);
|
||||
|
||||
let sysroot_str = sysroot.as_os_str().to_str().expect("sysroot should be UTF-8");
|
||||
if !matches!(self.config.dry_run, DryRun::SelfCheck) {
|
||||
self.verbose_than(0, || println!("using sysroot {sysroot_str}"));
|
||||
if self.is_verbose() && !matches!(self.config.dry_run, DryRun::SelfCheck) {
|
||||
println!("using sysroot {sysroot_str}");
|
||||
}
|
||||
|
||||
let mut rustflags = Rustflags::new(target);
|
||||
|
@ -2450,7 +2450,7 @@ pub(crate) fn initial_rustfmt(&self) -> Option<PathBuf> {
|
||||
|
||||
/// Runs a function if verbosity is greater than 0
|
||||
pub fn verbose(&self, f: impl Fn()) {
|
||||
if self.verbose > 0 {
|
||||
if self.is_verbose() {
|
||||
f()
|
||||
}
|
||||
}
|
||||
@ -2735,7 +2735,7 @@ fn download_ci_rustc_commit(&self, download_rustc: Option<StringOrBool>) -> Opti
|
||||
.success();
|
||||
if has_changes {
|
||||
if if_unchanged {
|
||||
if self.verbose > 0 {
|
||||
if self.is_verbose() {
|
||||
println!(
|
||||
"WARNING: saw changes to compiler/ or library/ since {commit}; \
|
||||
ignoring `download-rustc`"
|
||||
@ -2832,7 +2832,7 @@ pub fn last_modified_commit(
|
||||
let has_changes = !t!(git.as_command_mut().status()).success();
|
||||
if has_changes {
|
||||
if if_unchanged {
|
||||
if self.verbose > 0 {
|
||||
if self.is_verbose() {
|
||||
println!(
|
||||
"warning: saw changes to one of {modified_paths:?} since {commit}; \
|
||||
ignoring `{option_name}`"
|
||||
|
Loading…
Reference in New Issue
Block a user