Fixed issue from #64447
This commit is contained in:
parent
66bf391c3a
commit
fa2cfaf064
@ -1043,14 +1043,13 @@ impl EmitterWriter {
|
||||
}
|
||||
|
||||
fn get_max_line_num(&mut self, span: &MultiSpan, children: &[SubDiagnostic]) -> usize {
|
||||
let mut max = 0;
|
||||
|
||||
let primary = self.get_multispan_max_line_num(span);
|
||||
max = if primary > max { primary } else { max };
|
||||
let mut max = primary;
|
||||
|
||||
for sub in children {
|
||||
let sub_result = self.get_multispan_max_line_num(&sub.span);
|
||||
max = if sub_result > max { primary } else { max };
|
||||
max = if sub_result > max { sub_result } else { max };
|
||||
}
|
||||
max
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user