diff options
Diffstat (limited to 'compiler/rustc_middle/src/mir/mod.rs')
| -rw-r--r-- | compiler/rustc_middle/src/mir/mod.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index 63b8dd055bd..bc3c38fdb1c 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -2506,7 +2506,7 @@ impl<'tcx> ConstantKind<'tcx> { let hir_id = tcx.hir().local_def_id_to_hir_id(def.did); let parent_substs = if let Some(parent_hir_id) = tcx.hir().opt_parent_id(hir_id) { - if let Some(parent_did) = tcx.hir().opt_local_def_id(parent_hir_id) { + if let Some(parent_did) = parent_hir_id.as_owner() { InternalSubsts::identity_for_item(tcx, parent_did.to_def_id()) } else { tcx.mk_substs(Vec::<GenericArg<'tcx>>::new().into_iter()) | 
