Skip to content

Commit

Permalink
Rollup merge of rust-lang#64497 - nnethercote:fix-64339, r=petrochenkov
Browse files Browse the repository at this point in the history
Don't print the "total" `-Ztime-passes` output if `--prints=...` is also given

Fixes rust-lang#64339.
  • Loading branch information
Centril authored Sep 16, 2019
2 parents 75db571 + bb22986 commit acbbcda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,11 @@ pub struct TimePassesCallbacks {

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

Expand Down

0 comments on commit acbbcda

Please sign in to comment.