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 authored Oct 2, 2019
2 parents bb39529 + df203a2 commit 9e9e5b3
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 9e9e5b3

Please sign in to comment.