Skip to content

Commit acbbcda

Browse files
authored
Rollup merge of rust-lang#64497 - nnethercote:fix-64339, r=petrochenkov
Don't print the "total" `-Ztime-passes` output if `--prints=...` is also given Fixes rust-lang#64339.
2 parents 75db571 + bb22986 commit acbbcda

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/librustc_driver/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,11 @@ pub struct TimePassesCallbacks {
134134

135135
impl Callbacks for TimePassesCallbacks {
136136
fn config(&mut self, config: &mut interface::Config) {
137+
// If a --prints=... option has been given, we don't print the "total"
138+
// time because it will mess up the --prints output. See #64339.
137139
self.time_passes =
138-
config.opts.debugging_opts.time_passes || config.opts.debugging_opts.time;
140+
config.opts.prints.is_empty() &&
141+
(config.opts.debugging_opts.time_passes || config.opts.debugging_opts.time);
139142
}
140143
}
141144

0 commit comments

Comments
 (0)