1
Fork 0

More precise spans for HIR paths

This commit is contained in:
Vadim Petrochenkov 2021-03-13 19:14:18 +03:00
parent 2ccf06302c
commit 7e66e9d6b0
22 changed files with 60 additions and 30 deletions

View file

@ -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();
}