More precise spans for HIR paths
This commit is contained in:
parent
2ccf06302c
commit
7e66e9d6b0
22 changed files with 60 additions and 30 deletions
|
@ -104,7 +104,7 @@ pub fn report_object_safety_error(
|
|||
<https://doc.rust-lang.org/reference/items/traits.html#object-safety>",
|
||||
);
|
||||
|
||||
if tcx.sess.trait_methods_not_found.borrow().contains(&span) {
|
||||
if tcx.sess.trait_methods_not_found.borrow().iter().any(|full_span| full_span.contains(span)) {
|
||||
// Avoid emitting error caused by non-existing method (#58734)
|
||||
err.cancel();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue