Skip to content

Commit a21b7b3

Browse files
committed
Improve formatting of else block
1 parent aa6cc6e commit a21b7b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_errors/emitter.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,9 @@ impl EmitterWriter {
10161016
let loc = if let Some(first_line) = annotated_file.lines.first() {
10171017
let col = if let Some(first_annotation) = first_line.annotations.first() {
10181018
format!(":{}", first_annotation.start_col + 1)
1019-
} else { "".to_string() };
1019+
} else {
1020+
"".to_string()
1021+
};
10201022
format!("{}:{}{}",
10211023
annotated_file.file.name,
10221024
cm.doctest_offset_line(first_line.line_index),

0 commit comments

Comments
 (0)