Store adt_async_destructor in metadata
This commit is contained in:
parent
23f1fb58f2
commit
2b1c416da7
4 changed files with 7 additions and 4 deletions
|
@ -331,10 +331,7 @@ provide! { tcx, def_id, other, cdata,
|
||||||
visibility => { cdata.get_visibility(def_id.index) }
|
visibility => { cdata.get_visibility(def_id.index) }
|
||||||
adt_def => { cdata.get_adt_def(def_id.index, tcx) }
|
adt_def => { cdata.get_adt_def(def_id.index, tcx) }
|
||||||
adt_destructor => { table }
|
adt_destructor => { table }
|
||||||
adt_async_destructor => {
|
adt_async_destructor => { table }
|
||||||
let _ = cdata;
|
|
||||||
tcx.calculate_async_dtor(def_id, |_,_| Ok(()))
|
|
||||||
}
|
|
||||||
associated_item_def_ids => {
|
associated_item_def_ids => {
|
||||||
tcx.arena.alloc_from_iter(cdata.get_associated_item_or_field_def_ids(def_id.index))
|
tcx.arena.alloc_from_iter(cdata.get_associated_item_or_field_def_ids(def_id.index))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1637,6 +1637,10 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
||||||
if let Some(destructor) = tcx.adt_destructor(local_def_id) {
|
if let Some(destructor) = tcx.adt_destructor(local_def_id) {
|
||||||
record!(self.tables.adt_destructor[def_id] <- destructor);
|
record!(self.tables.adt_destructor[def_id] <- destructor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some(destructor) = tcx.adt_async_destructor(local_def_id) {
|
||||||
|
record!(self.tables.adt_async_destructor[def_id] <- destructor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
|
|
|
@ -447,6 +447,7 @@ define_tables! {
|
||||||
coroutine_kind: Table<DefIndex, hir::CoroutineKind>,
|
coroutine_kind: Table<DefIndex, hir::CoroutineKind>,
|
||||||
coroutine_for_closure: Table<DefIndex, RawDefId>,
|
coroutine_for_closure: Table<DefIndex, RawDefId>,
|
||||||
adt_destructor: Table<DefIndex, LazyValue<ty::Destructor>>,
|
adt_destructor: Table<DefIndex, LazyValue<ty::Destructor>>,
|
||||||
|
adt_async_destructor: Table<DefIndex, LazyValue<ty::AsyncDestructor>>,
|
||||||
coroutine_by_move_body_def_id: Table<DefIndex, RawDefId>,
|
coroutine_by_move_body_def_id: Table<DefIndex, RawDefId>,
|
||||||
eval_static_initializer: Table<DefIndex, LazyValue<mir::interpret::ConstAllocation<'static>>>,
|
eval_static_initializer: Table<DefIndex, LazyValue<mir::interpret::ConstAllocation<'static>>>,
|
||||||
trait_def: Table<DefIndex, LazyValue<ty::TraitDef>>,
|
trait_def: Table<DefIndex, LazyValue<ty::TraitDef>>,
|
||||||
|
|
|
@ -65,6 +65,7 @@ trivially_parameterized_over_tcx! {
|
||||||
crate::middle::lib_features::FeatureStability,
|
crate::middle::lib_features::FeatureStability,
|
||||||
crate::middle::resolve_bound_vars::ObjectLifetimeDefault,
|
crate::middle::resolve_bound_vars::ObjectLifetimeDefault,
|
||||||
crate::mir::ConstQualifs,
|
crate::mir::ConstQualifs,
|
||||||
|
ty::AsyncDestructor,
|
||||||
ty::AssocItemContainer,
|
ty::AssocItemContainer,
|
||||||
ty::Asyncness,
|
ty::Asyncness,
|
||||||
ty::DeducedParamAttrs,
|
ty::DeducedParamAttrs,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue