// FIXME(eddyb) should use `def_span`.
if let Some(did) = did.as_local() {
- let hir_id = self.tcx().hir().as_local_hir_id(did);
+ let hir_id = self.tcx().hir().local_def_id_to_hir_id(did);
let span = self.tcx().hir().span(hir_id);
p!(write("@{}", self.tcx().sess.source_map().span_to_string(span)));
// FIXME(eddyb) should use `def_span`.
if let Some(did) = did.as_local() {
- let hir_id = self.tcx().hir().as_local_hir_id(did);
+ let hir_id = self.tcx().hir().local_def_id_to_hir_id(did);
if self.tcx().sess.opts.debugging_opts.span_free_formats {
p!(write("@"), print_def_path(did.to_def_id(), substs));
} else {