1
Fork 0

Rollup merge of #109137 - petrochenkov:qcstore2, r=cjgillot

resolve: Querify most cstore access methods (subset 2)

These changes are less likely to cause perf regressions than the rest of https://github.com/rust-lang/rust/pull/108346.
This commit is contained in:
Matthias Krüger 2023-03-23 08:35:34 +01:00 committed by GitHub
commit 3e33fb9f12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 47 deletions

View file

@ -925,10 +925,6 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
tcx.mk_adt_def(did, adt_kind, variants, repr)
}
fn get_generics(self, item_id: DefIndex, sess: &Session) -> ty::Generics {
self.root.tables.generics_of.get(self, item_id).unwrap().decode((self, sess))
}
fn get_visibility(self, id: DefIndex) -> Visibility<DefId> {
self.root
.tables

View file

@ -545,10 +545,6 @@ impl CStore {
self.get_crate_data(def.krate).def_kind(def.index)
}
pub fn item_generics_num_lifetimes(&self, def_id: DefId, sess: &Session) -> usize {
self.get_crate_data(def_id.krate).get_generics(def_id.index, sess).own_counts().lifetimes
}
pub fn module_expansion_untracked(&self, def_id: DefId, sess: &Session) -> ExpnId {
self.get_crate_data(def_id.krate).module_expansion(def_id.index, sess)
}
@ -560,14 +556,6 @@ impl CStore {
self.get_crate_data(cnum).num_def_ids()
}
pub fn item_attrs_untracked<'a>(
&'a self,
def_id: DefId,
sess: &'a Session,
) -> impl Iterator<Item = ast::Attribute> + 'a {
self.get_crate_data(def_id.krate).get_item_attrs(def_id.index, sess)
}
pub fn get_proc_macro_quoted_span_untracked(
&self,
cnum: CrateNum,