diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-02-18 16:57:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-18 16:57:43 +0100 |
| commit | efdcb4301be26f96ee6e2df18f7b47dcfe89b129 (patch) | |
| tree | 55327092c7e615916a77097f6e9bcda60b139266 /compiler/rustc_data_structures/src | |
| parent | 555db2da70fb10103263148d678a72901a455d50 (diff) | |
| parent | 6165d1cc72f8af55b3ef16ad81273b80876f9518 (diff) | |
| download | rust-efdcb4301be26f96ee6e2df18f7b47dcfe89b129.tar.gz rust-efdcb4301be26f96ee6e2df18f7b47dcfe89b129.zip | |
Rollup merge of #82256 - eddyb:time-passes-stderr, r=varkor
Print -Ztime-passes (and misc stats/logs) on stderr, not stdout. I've tried not to change anything that looked similar to `rustc --print`, where people might use automation, and/or any "bulk" prints, such as dumping an entire Graphviz (`dot`) graph on stdout. The reason I want `-Ztime-passes` to be on stderr like debug logging is I can get a complete (and correctly interleaved) view just by looking at stderr, which is merely a convenience when running `rustc`/Cargo directly, but even more important when it's nested in a build script, as Cargo will split the build script output into stdout (named `output`) and `stderr`.
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/profiling.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/profiling.rs b/compiler/rustc_data_structures/src/profiling.rs index f0b413c795e..51f851dc946 100644 --- a/compiler/rustc_data_structures/src/profiling.rs +++ b/compiler/rustc_data_structures/src/profiling.rs @@ -608,7 +608,7 @@ pub fn print_time_passes_entry( (None, None) => String::new(), }; - println!("time: {:>7}{}\t{}", duration_to_secs_str(dur), mem_string, what); + eprintln!("time: {:>7}{}\t{}", duration_to_secs_str(dur), mem_string, what); } // Hack up our own formatting for the duration to make it easier for scripts |
