diff options
| author | varkor <github@varkor.com> | 2018-01-27 15:16:42 +0000 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2018-01-27 15:16:42 +0000 |
| commit | a21b7b3b162932011b83f4703fb87030c216e962 (patch) | |
| tree | a363dddae783ee994cd71bf9157d5ba61cb334aa /src/librustc_errors | |
| parent | aa6cc6e1898067c4311e260960bca776f3e02715 (diff) | |
| download | rust-a21b7b3b162932011b83f4703fb87030c216e962.tar.gz rust-a21b7b3b162932011b83f4703fb87030c216e962.zip | |
Improve formatting of else block
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/emitter.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index a9f228ca729..63c4ae5561c 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -1016,7 +1016,9 @@ impl EmitterWriter { let loc = if let Some(first_line) = annotated_file.lines.first() { let col = if let Some(first_annotation) = first_line.annotations.first() { format!(":{}", first_annotation.start_col + 1) - } else { "".to_string() }; + } else { + "".to_string() + }; format!("{}:{}{}", annotated_file.file.name, cm.doctest_offset_line(first_line.line_index), |
