diff --git a/src/librustc_mir/monomorphize/collector.rs b/src/librustc_mir/monomorphize/collector.rs index bd94e573c6f3..dae5f1b8cd25 100644 --- a/src/librustc_mir/monomorphize/collector.rs +++ b/src/librustc_mir/monomorphize/collector.rs @@ -1183,11 +1183,11 @@ fn collect_miri<'a, 'tcx>( ) { let alloc_kind = tcx.alloc_map.lock().get(alloc_id); match alloc_kind { - Some(GlobalAlloc::Static(did)) => { - let instance = Instance::mono(tcx, did); + Some(GlobalAlloc::Static(def_id)) => { + let instance = Instance::mono(tcx, def_id); if should_monomorphize_locally(tcx, &instance) { - trace!("collecting static {:?}", did); - output.push(MonoItem::Static(did)); + trace!("collecting static {:?}", def_id); + output.push(MonoItem::Static(def_id)); } } Some(GlobalAlloc::Memory(alloc)) => { @@ -1263,7 +1263,7 @@ fn collect_const<'a, 'tcx>( collect_miri(tcx, id, output); } } - ConstValue::Unevaluated(did, substs) => { + ConstValue::Unevaluated(def_id, substs) => { let param_env = ty::ParamEnv::reveal_all(); let substs = tcx.subst_and_normalize_erasing_regions( param_substs, @@ -1272,7 +1272,7 @@ fn collect_const<'a, 'tcx>( ); let instance = ty::Instance::resolve(tcx, param_env, - did, + def_id, substs).unwrap(); let cid = GlobalId { @@ -1283,7 +1283,7 @@ fn collect_const<'a, 'tcx>( Ok(val) => collect_const(tcx, val, param_substs, output), Err(ErrorHandled::Reported) => {}, Err(ErrorHandled::TooGeneric) => span_bug!( - tcx.def_span(did), "collection encountered polymorphic constant", + tcx.def_span(def_id), "collection encountered polymorphic constant", ), } }