Rollup merge of #65010 - AnthonyMikh:fix_65001, r=estebank

Compare `primary` with maximum of `children`s' line num instead of dropping it

Fix #65001.
This commit is contained in:
Mazdak Farrokhzad 2019-10-03 04:08:19 +02:00 committed by GitHub
commit d5a0765f44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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