}
ty::BoundRegion::BrEnv => {
- let mir_hir_id = self.infcx.tcx.hir().as_local_hir_id(self.mir_def_id);
+ let mir_hir_id = self.infcx.tcx.hir().local_def_id_to_hir_id(self.mir_def_id);
let def_ty = self.regioncx.universal_regions().defining_ty;
if let DefiningTy::Closure(_, substs) = def_ty {
&self,
argument_index: usize,
) -> Option<&hir::Ty<'tcx>> {
- let mir_hir_id = self.infcx.tcx.hir().as_local_hir_id(self.mir_def_id);
+ let mir_hir_id = self.infcx.tcx.hir().local_def_id_to_hir_id(self.mir_def_id);
let fn_decl = self.infcx.tcx.hir().fn_decl_by_hir_id(mir_hir_id)?;
let argument_hir_ty: &hir::Ty<'_> = fn_decl.inputs.get(argument_index)?;
match argument_hir_ty.kind {
highlight.highlighting_region_vid(fr, *self.next_region_name.try_borrow().unwrap());
let type_name = self.infcx.extract_type_name(&return_ty, Some(highlight)).0;
- let mir_hir_id = tcx.hir().as_local_hir_id(self.mir_def_id);
+ let mir_hir_id = tcx.hir().local_def_id_to_hir_id(self.mir_def_id);
let (return_span, mir_description) = match tcx.hir().get(mir_hir_id) {
hir::Node::Expr(hir::Expr {
highlight.highlighting_region_vid(fr, *self.next_region_name.try_borrow().unwrap());
let type_name = self.infcx.extract_type_name(&yield_ty, Some(highlight)).0;
- let mir_hir_id = tcx.hir().as_local_hir_id(self.mir_def_id);
+ let mir_hir_id = tcx.hir().local_def_id_to_hir_id(self.mir_def_id);
let yield_span = match tcx.hir().get(mir_hir_id) {
hir::Node::Expr(hir::Expr {