rustc: hir().local_def_id_to_hir_id() -> tcx.local_def_id_to_hir_id() cleanup
This commit is contained in:
@@ -451,7 +451,7 @@ fn construct_fn<'tcx>(
|
||||
fn_sig: ty::FnSig<'tcx>,
|
||||
) -> Body<'tcx> {
|
||||
let span = tcx.def_span(fn_def);
|
||||
let fn_id = tcx.hir().local_def_id_to_hir_id(fn_def);
|
||||
let fn_id = tcx.local_def_id_to_hir_id(fn_def);
|
||||
let coroutine_kind = tcx.coroutine_kind(fn_def);
|
||||
|
||||
// The representation of thir for `-Zunpretty=thir-tree` relies on
|
||||
@@ -569,7 +569,7 @@ fn construct_const<'a, 'tcx>(
|
||||
expr: ExprId,
|
||||
const_ty: Ty<'tcx>,
|
||||
) -> Body<'tcx> {
|
||||
let hir_id = tcx.hir().local_def_id_to_hir_id(def);
|
||||
let hir_id = tcx.local_def_id_to_hir_id(def);
|
||||
|
||||
// Figure out what primary body this item has.
|
||||
let (span, const_ty_span) = match tcx.hir().get(hir_id) {
|
||||
@@ -622,7 +622,7 @@ fn construct_const<'a, 'tcx>(
|
||||
/// with type errors, but normal MIR construction can't handle that in general.
|
||||
fn construct_error(tcx: TyCtxt<'_>, def_id: LocalDefId, guar: ErrorGuaranteed) -> Body<'_> {
|
||||
let span = tcx.def_span(def_id);
|
||||
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
|
||||
let hir_id = tcx.local_def_id_to_hir_id(def_id);
|
||||
let coroutine_kind = tcx.coroutine_kind(def_id);
|
||||
|
||||
let (inputs, output, yield_ty) = match tcx.def_kind(def_id) {
|
||||
|
||||
Reference in New Issue
Block a user