summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-09-30 14:33:48 +0200
committerGitHub <noreply@github.com>2024-09-30 14:33:48 +0200
commit5ba81d723ae1bd13d496b52d2f02e53b583de752 (patch)
treedc4c255e1dc6a60a52236e321cb0eed8c472293a
parentd97c6611558796073c26482609702b5e9ee63529 (diff)
parentfd1429a56b5c6eadb6205c982f4945b631f55db9 (diff)
Rollup merge of #131061 - onur-ozkan:verbose-checks, r=Kobzol
replace manual verbose checks with `Config::is_verbose` self-explanatory
-rw-r--r--src/bootstrap/src/core/builder.rs4
-rw-r--r--src/bootstrap/src/core/config/config.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
index 6ba669f3b10..77cfd404744 100644
--- a/src/bootstrap/src/core/builder.rs
+++ b/src/bootstrap/src/core/builder.rs
@@ -1564,8 +1564,8 @@ impl<'a> Builder<'a> {
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);
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index 3c0afb858f8..07460b81412 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -2450,7 +2450,7 @@ impl Config {
/// 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 @@ impl Config {
.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 @@ impl Config {
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}`"