Skip to content

Commit bb22986

Browse files
committed
Don't print the "total" -Ztime-passes output if --prints=... is also given.
Fixes #64339.
1 parent ca3766e commit bb22986

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
@@ -132,8 +132,11 @@ pub struct TimePassesCallbacks {
132132

133133
impl Callbacks for TimePassesCallbacks {
134134
fn config(&mut self, config: &mut interface::Config) {
135+
// If a --prints=... option has been given, we don't print the "total"
136+
// time because it will mess up the --prints output. See #64339.
135137
self.time_passes =
136-
config.opts.debugging_opts.time_passes || config.opts.debugging_opts.time;
138+
config.opts.prints.is_empty() &&
139+
(config.opts.debugging_opts.time_passes || config.opts.debugging_opts.time);
137140
}
138141
}
139142

0 commit comments

Comments
 (0)