Rewrite representability
This commit is contained in:
parent
e42c4d7218
commit
ff940db666
61 changed files with 537 additions and 744 deletions
|
@ -210,6 +210,7 @@ provide! { tcx, def_id, other, cdata,
|
|||
lookup_const_stability => { table }
|
||||
lookup_default_body_stability => { table }
|
||||
lookup_deprecation_entry => { table }
|
||||
params_in_repr => { table }
|
||||
unused_generic_params => { table }
|
||||
opt_def_kind => { table_direct }
|
||||
impl_parent => { table }
|
||||
|
|
|
@ -1156,6 +1156,10 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
|||
if let DefKind::Trait | DefKind::TraitAlias = def_kind {
|
||||
record!(self.tables.super_predicates_of[def_id] <- self.tcx.super_predicates_of(def_id));
|
||||
}
|
||||
if let DefKind::Enum | DefKind::Struct | DefKind::Union = def_kind {
|
||||
let params_in_repr = self.tcx.params_in_repr(def_id);
|
||||
record!(self.tables.params_in_repr[def_id] <- params_in_repr);
|
||||
}
|
||||
if should_encode_trait_impl_trait_tys(tcx, def_id)
|
||||
&& let Ok(table) = self.tcx.collect_trait_impl_trait_tys(def_id)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,8 @@ use rustc_hir::def::{CtorKind, DefKind};
|
|||
use rustc_hir::def_id::{CrateNum, DefId, DefIndex, DefPathHash, StableCrateId};
|
||||
use rustc_hir::definitions::DefKey;
|
||||
use rustc_hir::lang_items;
|
||||
use rustc_index::{bit_set::FiniteBitSet, vec::IndexVec};
|
||||
use rustc_index::bit_set::{BitSet, FiniteBitSet};
|
||||
use rustc_index::vec::IndexVec;
|
||||
use rustc_middle::metadata::ModChild;
|
||||
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
|
||||
use rustc_middle::middle::exported_symbols::{ExportedSymbol, SymbolExportInfo};
|
||||
|
@ -383,6 +384,7 @@ define_tables! {
|
|||
inherent_impls: Table<DefIndex, LazyArray<DefIndex>>,
|
||||
expn_that_defined: Table<DefIndex, LazyValue<ExpnId>>,
|
||||
unused_generic_params: Table<DefIndex, LazyValue<FiniteBitSet<u32>>>,
|
||||
params_in_repr: Table<DefIndex, LazyValue<BitSet<u32>>>,
|
||||
repr_options: Table<DefIndex, LazyValue<ReprOptions>>,
|
||||
// `def_keys` and `def_path_hashes` represent a lazy version of a
|
||||
// `DefPathTable`. This allows us to avoid deserializing an entire
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue