Skip to content

Commit

Permalink
Rollup merge of #65010 - AnthonyMikh:fix_65001, r=estebank
Browse files Browse the repository at this point in the history
Compare `primary` with maximum of `children`s' line num instead of dropping it

Fix #65001.
  • Loading branch information
Centril committed Oct 3, 2019
2 parents 4ea2be7 + df203a2 commit d5a0765
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 d5a0765

Please sign in to comment.