load_cached(tcx, id) {
let generics: Option<ty::Generics> = tcx.queries.on_disk_cache
.try_load_query_result(tcx, id);
- generics.map(|x| tcx.alloc_generics(x))
+ generics.map(|x| &*tcx.arena.alloc(x))
}
}
desc { "getting a list of all mir_keys" }
}
- /// Maps DefId's that have an associated Mir to the result
+ /// Maps DefId's that have an associated `mir::Body` to the result
/// of the MIR qualify_consts pass. The actual meaning of
/// the value isn't known except to the pass itself.
query mir_const_qualif(key: DefId) -> (u8, &'tcx BitSet<mir::Local>) {
/// Fetch the MIR for a given `DefId` right after it's built - this includes
/// unreachable code.
- query mir_built(_: DefId) -> &'tcx Steal<mir::Mir<'tcx>> {}
+ query mir_built(_: DefId) -> &'tcx Steal<mir::Body<'tcx>> {}
/// Fetch the MIR for a given `DefId` up till the point where it is
/// ready for const evaluation.
///
/// See the README for the `mir` module for details.
- query mir_const(_: DefId) -> &'tcx Steal<mir::Mir<'tcx>> {
+ query mir_const(_: DefId) -> &'tcx Steal<mir::Body<'tcx>> {
no_hash
}
- query mir_validated(_: DefId) -> &'tcx Steal<mir::Mir<'tcx>> {
+ query mir_validated(_: DefId) -> &'tcx Steal<mir::Body<'tcx>> {
no_hash
}
/// MIR after our optimization passes have run. This is MIR that is ready
/// for codegen. This is also the only query that can fetch non-local MIR, at present.
- query optimized_mir(key: DefId) -> &'tcx mir::Mir<'tcx> {
+ query optimized_mir(key: DefId) -> &'tcx mir::Body<'tcx> {
cache { key.is_local() }
load_cached(tcx, id) {
- let mir: Option<crate::mir::Mir<'tcx>> = tcx.queries.on_disk_cache
+ let mir: Option<crate::mir::Body<'tcx>> = tcx.queries.on_disk_cache
.try_load_query_result(tcx, id);
- mir.map(|x| tcx.alloc_mir(x))
+ mir.map(|x| &*tcx.arena.alloc(x))
}
}
}
query associated_item_def_ids(_: DefId) -> &'tcx [DefId] {}
/// Maps from a trait item to the trait item "descriptor".
- query associated_item(_: DefId) -> ty::AssociatedItem {}
+ query associated_item(_: DefId) -> ty::AssocItem {}
query impl_trait_ref(_: DefId) -> Option<ty::TraitRef<'tcx>> {}
query impl_polarity(_: DefId) -> hir::ImplPolarity {}
.queries.on_disk_cache
.try_load_query_result(tcx, id);
- typeck_tables.map(|tables| tcx.alloc_tables(tables))
+ typeck_tables.map(|tables| &*tcx.arena.alloc(tables))
}
}
}
/// in the case of closures, this will be redirected to the enclosing function.
query region_scope_tree(_: DefId) -> &'tcx region::ScopeTree {}
- query mir_shims(key: ty::InstanceDef<'tcx>) -> &'tcx mir::Mir<'tcx> {
+ query mir_shims(key: ty::InstanceDef<'tcx>) -> &'tcx mir::Body<'tcx> {
no_force
desc { |tcx| "generating MIR shim for `{}`", tcx.def_path_str(key.def_id()) }
}
fatal_cycle
desc { "test whether a crate has #![no_builtins]" }
}
+ query symbol_mangling_version(_: CrateNum) -> SymbolManglingVersion {
+ fatal_cycle
+ desc { "query a crate's symbol mangling version" }
+ }
query extern_crate(_: DefId) -> Option<&'tcx ExternCrate> {
eval_always