Fix span calculation on secondary_label as well
This commit is contained in:
parent
e2116acae5
commit
99bd24e9a3
3 changed files with 22 additions and 2 deletions
|
@ -995,8 +995,9 @@ pub fn expand_preparsed_format_args(
|
|||
e.note(¬e);
|
||||
}
|
||||
if let Some((label, span)) = err.secondary_label {
|
||||
let sp = fmt_span.from_inner(span);
|
||||
e.span_label(sp, label);
|
||||
if efmt_kind_is_lit {
|
||||
e.span_label(fmt_span.from_inner(span), label);
|
||||
}
|
||||
}
|
||||
e.emit();
|
||||
return DummyResult::raw_expr(sp, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue