Skip to content

Commit fe74134

Browse files
authored
Unrolled build for rust-lang#131061
Rollup merge of rust-lang#131061 - onur-ozkan:verbose-checks, r=Kobzol replace manual verbose checks with `Config::is_verbose` self-explanatory
2 parents b529e27 + fd1429a commit fe74134

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/bootstrap/src/core/builder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1564,8 +1564,8 @@ impl<'a> Builder<'a> {
15641564
let libdir = self.rustc_libdir(compiler);
15651565

15661566
let sysroot_str = sysroot.as_os_str().to_str().expect("sysroot should be UTF-8");
1567-
if !matches!(self.config.dry_run, DryRun::SelfCheck) {
1568-
self.verbose_than(0, || println!("using sysroot {sysroot_str}"));
1567+
if self.is_verbose() && !matches!(self.config.dry_run, DryRun::SelfCheck) {
1568+
println!("using sysroot {sysroot_str}");
15691569
}
15701570

15711571
let mut rustflags = Rustflags::new(target);

src/bootstrap/src/core/config/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2450,7 +2450,7 @@ impl Config {
24502450

24512451
/// Runs a function if verbosity is greater than 0
24522452
pub fn verbose(&self, f: impl Fn()) {
2453-
if self.verbose > 0 {
2453+
if self.is_verbose() {
24542454
f()
24552455
}
24562456
}
@@ -2735,7 +2735,7 @@ impl Config {
27352735
.success();
27362736
if has_changes {
27372737
if if_unchanged {
2738-
if self.verbose > 0 {
2738+
if self.is_verbose() {
27392739
println!(
27402740
"WARNING: saw changes to compiler/ or library/ since {commit}; \
27412741
ignoring `download-rustc`"
@@ -2832,7 +2832,7 @@ impl Config {
28322832
let has_changes = !t!(git.as_command_mut().status()).success();
28332833
if has_changes {
28342834
if if_unchanged {
2835-
if self.verbose > 0 {
2835+
if self.is_verbose() {
28362836
println!(
28372837
"warning: saw changes to one of {modified_paths:?} since {commit}; \
28382838
ignoring `{option_name}`"

0 commit comments

Comments
 (0)