]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir_build/build/mod.rs
Rollup merge of #75485 - RalfJung:pin, r=nagisa
[rust.git] / src / librustc_mir_build / build / mod.rs
index 215a0c7dfdf2712dbb1c6ad3909775e41d35b688..0c3f6fee665e85bc4afa1736e2ee7ffdef71fb30 100644 (file)
@@ -34,7 +34,7 @@
 
 /// Construct the MIR for a given `DefId`.
 fn mir_build(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) -> Body<'_> {
-    let id = tcx.hir().as_local_hir_id(def.did);
+    let id = tcx.hir().local_def_id_to_hir_id(def.did);
 
     // Figure out what primary body this item has.
     let (body_id, return_ty_span) = match tcx.hir().get(id) {