has_global_allocator: tcx.has_global_allocator(LOCAL_CRATE),
has_panic_handler: tcx.has_panic_handler(LOCAL_CRATE),
has_default_lib_allocator,
- plugin_registrar_fn: tcx.plugin_registrar_fn(LOCAL_CRATE).map(|id| id.index),
proc_macro_data,
compiler_builtins: tcx.sess.contains_name(&attrs, sym::compiler_builtins),
needs_allocator: tcx.sess.contains_name(&attrs, sym::needs_allocator),
record!(self.tables.super_predicates[def_id] <- self.tcx.super_predicates_of(def_id));
}
}
- let inherent_impls = tcx.crate_inherent_impls(LOCAL_CRATE);
+ let inherent_impls = tcx.crate_inherent_impls(());
for (def_id, implementations) in inherent_impls.inherent_impls.iter() {
- assert!(def_id.is_local());
if implementations.is_empty() {
continue;
}
- record!(self.tables.inherent_impls[def_id] <- implementations.iter().map(|&def_id| {
+ record!(self.tables.inherent_impls[def_id.to_def_id()] <- implementations.iter().map(|&def_id| {
assert!(def_id.is_local());
def_id.index
}));
let mut keys_and_jobs = self
.tcx
- .mir_keys(LOCAL_CRATE)
+ .mir_keys(())
.iter()
.filter_map(|&def_id| {
let (encode_const, encode_opt) = should_encode_mir(self.tcx, def_id);
let tcx = self.tcx;
let hir = tcx.hir();
- let proc_macro_decls_static = tcx.proc_macro_decls_static(LOCAL_CRATE).unwrap().index;
+ let proc_macro_decls_static = tcx.proc_macro_decls_static(()).unwrap().local_def_index;
let stability = tcx.lookup_stability(DefId::local(CRATE_DEF_INDEX)).copied();
let macros = self.lazy(hir.krate().proc_macros.iter().map(|p| p.owner.local_def_index));
let spans = self.tcx.sess.parse_sess.proc_macro_quoted_spans();
fn encode_dylib_dependency_formats(&mut self) -> Lazy<[Option<LinkagePreference>]> {
empty_proc_macro!(self);
- let formats = self.tcx.dependency_formats(LOCAL_CRATE);
+ let formats = self.tcx.dependency_formats(());
for (ty, arr) in formats.iter() {
if *ty != CrateType::Dylib {
continue;
return;
}
- par_iter(tcx.mir_keys(LOCAL_CRATE)).for_each(|&def_id| {
+ par_iter(tcx.mir_keys(())).for_each(|&def_id| {
let (encode_const, encode_opt) = should_encode_mir(tcx, def_id);
if encode_const {