Make is_intrinsic
query return the intrinsic name
This commit is contained in:
parent
de4d615e6b
commit
0eee945680
22 changed files with 38 additions and 43 deletions
|
@ -1746,8 +1746,8 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
|
|||
self.root.tables.attr_flags.get(self, index)
|
||||
}
|
||||
|
||||
fn get_is_intrinsic(self, index: DefIndex) -> bool {
|
||||
self.root.tables.is_intrinsic.get(self, index)
|
||||
fn get_intrinsic(self, index: DefIndex) -> bool {
|
||||
self.root.tables.intrinsic.get(self, index)
|
||||
}
|
||||
|
||||
fn get_doc_link_resolutions(self, index: DefIndex) -> DocLinkResMap {
|
||||
|
|
|
@ -348,7 +348,7 @@ provide! { tcx, def_id, other, cdata,
|
|||
cdata.get_stability_implications(tcx).iter().copied().collect()
|
||||
}
|
||||
stripped_cfg_items => { cdata.get_stripped_cfg_items(cdata.cnum, tcx) }
|
||||
is_intrinsic => { cdata.get_is_intrinsic(def_id.index) }
|
||||
intrinsic => { cdata.get_intrinsic(def_id.index).then(|| tcx.item_name(def_id)) }
|
||||
defined_lang_items => { cdata.get_lang_items(tcx) }
|
||||
diagnostic_items => { cdata.get_diagnostic_items() }
|
||||
missing_lang_items => { cdata.get_missing_lang_items(tcx) }
|
||||
|
|
|
@ -1411,7 +1411,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
|||
if let DefKind::Fn | DefKind::AssocFn = def_kind {
|
||||
self.tables.asyncness.set_some(def_id.index, tcx.asyncness(def_id));
|
||||
record_array!(self.tables.fn_arg_names[def_id] <- tcx.fn_arg_names(def_id));
|
||||
self.tables.is_intrinsic.set(def_id.index, tcx.is_intrinsic(def_id));
|
||||
self.tables.intrinsic.set(def_id.index, tcx.intrinsic(def_id).is_some());
|
||||
}
|
||||
if let DefKind::TyParam = def_kind {
|
||||
let default = self.tcx.object_lifetime_default(def_id);
|
||||
|
|
|
@ -375,7 +375,7 @@ macro_rules! define_tables {
|
|||
|
||||
define_tables! {
|
||||
- defaulted:
|
||||
is_intrinsic: Table<DefIndex, bool>,
|
||||
intrinsic: Table<DefIndex, bool>,
|
||||
is_macro_rules: Table<DefIndex, bool>,
|
||||
is_type_alias_impl_trait: Table<DefIndex, bool>,
|
||||
type_alias_is_lazy: Table<DefIndex, bool>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue