implement is_accessible_span
This commit is contained in:
@@ -299,7 +299,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> {
|
||||
err.note(&format!("attempting to deref into `{}`", deref_target_ty));
|
||||
|
||||
// Check first whether the source is accessible (issue #87060)
|
||||
if tcx.sess.source_map().span_to_snippet(deref_target).is_ok() {
|
||||
if tcx.sess.source_map().is_accessible_span(deref_target) {
|
||||
err.span_note(deref_target, "deref defined here");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user