Don't use a custom disk loader for diagnostic_only_typeck

This uses exactly the same types for query results as `typeck`, which doesn't have custom code.
It's not clear to me why this code exists (it goes back even before queries used a proc macro),
but it compiles fine without the custom loader. Remove it for simplicity.
This commit is contained in:
Joshua Nelson 2022-09-01 21:49:57 -05:00
parent b7c9687d2e
commit 8da754ef00

View File

@ -883,13 +883,6 @@
query diagnostic_only_typeck(key: LocalDefId) -> &'tcx ty::TypeckResults<'tcx> {
desc { |tcx| "type-checking `{}`", tcx.def_path_str(key.to_def_id()) }
cache_on_disk_if { true }
load_cached(tcx, id) {
let typeck_results: Option<ty::TypeckResults<'tcx>> = tcx
.on_disk_cache().as_ref()
.and_then(|c| c.try_load_query_result(*tcx, id));
typeck_results.map(|x| &*tcx.arena.alloc(x))
}
}
query used_trait_imports(key: LocalDefId) -> &'tcx FxHashSet<LocalDefId> {