diff options
| author | mejrs <> | 2022-10-24 20:52:51 +0200 |
|---|---|---|
| committer | mejrs <> | 2022-10-24 20:52:51 +0200 |
| commit | 854b3166a05916f01b6a7cb9c09fc7c8d26697ad (patch) | |
| tree | 159dd54e8e4f48c6ee31908766bd54c84a19ac97 /compiler/rustc_errors/src | |
| parent | 406e1dc8ebdeb509515c0c8be7cfe015c5eced30 (diff) | |
| download | rust-854b3166a05916f01b6a7cb9c09fc7c8d26697ad.tar.gz rust-854b3166a05916f01b6a7cb9c09fc7c8d26697ad.zip | |
Address some comments
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index b9b9a59e354..b7b8fe3f25a 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -559,7 +559,7 @@ impl Emitter for EmitterWriter { &primary_span, &children, &suggestions, - Some(&diag.emitted_at), + self.track_diagnostics.then_some(&diag.emitted_at), ); } @@ -1661,7 +1661,7 @@ impl EmitterWriter { } } - if self.track_diagnostics && let Some(tracked) = emitted_at { + if let Some(tracked) = emitted_at { let track = format!("-Ztrack-diagnostics: created at {tracked}"); let len = buffer.num_lines(); buffer.append(len, &track, Style::NoStyle); |
