Skip to content

Commit

Permalink
Compare primary with value instead of dropping it
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyMikh authored Oct 2, 2019
1 parent f2023ac commit df203a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librustc_errors/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,8 @@ impl EmitterWriter {
children.iter()
.map(|sub| self.get_multispan_max_line_num(&sub.span))
.max()
.unwrap_or(primary)
.unwrap_or(0)
.max(primary)
}

/// Adds a left margin to every line but the first, given a padding length and the label being
Expand Down

0 comments on commit df203a2

Please sign in to comment.