diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2018-11-25 13:05:06 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2019-01-20 13:29:03 -0800 |
| commit | c4b8df5df25aa8859d751ec0a7af3e7a0d6d699a (patch) | |
| tree | 81860bc16cb034f952f647caa022d6060afdf31f /src/librustc_errors | |
| parent | 0c0c585281740aba4c91cbfd385f5e1fbe313d11 (diff) | |
| download | rust-c4b8df5df25aa8859d751ec0a7af3e7a0d6d699a.tar.gz rust-c4b8df5df25aa8859d751ec0a7af3e7a0d6d699a.zip | |
Remove unnecessary dummy span checks
The emitter already verifies wether a given span note or span label can be emitted to the output. If it can't, because it is a dummy span, it will be either elided for labels or emitted as an unspanned note/help when applicable.
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/emitter.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 0443b2228e5..25d09a33c15 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -959,7 +959,7 @@ impl EmitterWriter { Style::MainHeaderMsg }; - if msp.primary_spans().is_empty() && msp.span_labels().is_empty() && is_secondary + if !msp.has_primary_spans() && !msp.has_span_labels() && is_secondary && !self.short_message { // This is a secondary message with no span info for _ in 0..max_line_num_len { |
