1
Fork 0

Remove guess_head_span.

This commit is contained in:
Camille GILLOT 2022-07-23 14:42:54 +02:00
parent 36f4f4aa38
commit 6733bc3066
20 changed files with 93 additions and 103 deletions

View file

@ -1754,8 +1754,7 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
|| self.in_assoc_ty
|| self.tcx.resolutions(()).has_pub_restricted
{
let vis_span =
self.tcx.sess.source_map().guess_head_span(self.tcx.def_span(def_id));
let vis_span = self.tcx.def_span(def_id);
if kind == "trait" {
self.tcx.sess.emit_err(InPublicInterfaceTraits {
span,