about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoshua Nelson <jnelson@cloudflare.com>2022-09-01 21:49:57 -0500
committerJoshua Nelson <jnelson@cloudflare.com>2022-09-09 20:16:47 -0500
commit8da754ef00488ffdb1259f104fd6084327b3bd45 (patch)
tree1f82a5417a829834ed52fa79057c85f448aa44b8
parentb7c9687d2e2504de0e0047b19fec00c54efc08a7 (diff)
downloadrust-8da754ef00488ffdb1259f104fd6084327b3bd45.tar.gz
rust-8da754ef00488ffdb1259f104fd6084327b3bd45.zip
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.
-rw-r--r--compiler/rustc_middle/src/query/mod.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs
index 8e62b05d5f6..30e947258ba 100644
--- a/compiler/rustc_middle/src/query/mod.rs
+++ b/compiler/rustc_middle/src/query/mod.rs
@@ -883,13 +883,6 @@ rustc_queries! {
     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> {