resolve: Remove item_attrs_untracked

This commit is contained in:
Vadim Petrochenkov 2023-02-22 01:24:55 +04:00
parent f28f77f2d9
commit d99e01fa7e
2 changed files with 1 additions and 12 deletions

View File

@ -576,14 +576,6 @@ impl CStore {
self.get_crate_data(cnum).num_def_ids() 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( pub fn get_proc_macro_quoted_span_untracked(
&self, &self,
cnum: CrateNum, cnum: CrateNum,

View File

@ -1906,10 +1906,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
return v.clone(); return v.clone();
} }
let attr = self let attr = self.tcx.get_attr(def_id, sym::rustc_legacy_const_generics)?;
.cstore()
.item_attrs_untracked(def_id, self.tcx.sess)
.find(|a| a.has_name(sym::rustc_legacy_const_generics))?;
let mut ret = Vec::new(); let mut ret = Vec::new();
for meta in attr.meta_item_list()? { for meta in attr.meta_item_list()? {
match meta.lit()?.kind { match meta.lit()?.kind {