Skip to content

Commit

Permalink
Improve formatting of else block
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Jan 27, 2018
1 parent aa6cc6e commit a21b7b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc_errors/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit a21b7b3

Please sign in to comment.