1
Fork 0

Point at method call when it is the source of the bound error

This commit is contained in:
Esteban Küber 2022-12-11 14:49:50 -08:00
parent ce486d538b
commit 2838b8e515
29 changed files with 93 additions and 161 deletions

View file

@ -370,7 +370,11 @@ impl Diagnostic {
self.set_span(after);
for span_label in before.span_labels() {
if let Some(label) = span_label.label {
self.span.push_span_label(after, label);
if span_label.is_primary {
self.span.push_span_label(after, label);
} else {
self.span.push_span_label(span_label.span, label);
}
}
}
self