diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-09-16 13:27:38 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-09-16 13:27:38 +1000 |
| commit | bb229865fa6f1178dcb2c87279336f9bf36d7282 (patch) | |
| tree | 1aa98f6a78e57c3fa215f95a74a842830f82de98 /src | |
| parent | ca3766e2e58f462a20922e42c821a37eaf0e13db (diff) | |
| download | rust-bb229865fa6f1178dcb2c87279336f9bf36d7282.tar.gz rust-bb229865fa6f1178dcb2c87279336f9bf36d7282.zip | |
Don't print the "total" `-Ztime-passes` output if `--prints=...` is also given.
Fixes #64339.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_driver/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index a912ea3c358..dc2592d1640 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -132,8 +132,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); } } |
