Point at method call when it is the source of the bound error
This commit is contained in:
parent
ce486d538b
commit
2838b8e515
29 changed files with 93 additions and 161 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue