about summary refs log tree commit diff
path: root/compiler/rustc_query_impl
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-09-16 11:17:01 +0530
committerGitHub <noreply@github.com>2022-09-16 11:17:01 +0530
commit28b4c62382988b895e505698289939f71248626f (patch)
tree08fec7c6d3ba0039d3951db1376f7ee323124960 /compiler/rustc_query_impl
parentedf9e5eb63e391edd5cb999179effa361b005c20 (diff)
parent4cdf264e6fe58325dcedb2f571cbac4aed095eb7 (diff)
downloadrust-28b4c62382988b895e505698289939f71248626f.tar.gz
rust-28b4c62382988b895e505698289939f71248626f.zip
Rollup merge of #101787 - compiler-errors:cache-rpitit, r=petrochenkov
cache `collect_trait_impl_trait_tys`

Micro-optimization for RPITITs
Diffstat (limited to 'compiler/rustc_query_impl')
-rw-r--r--compiler/rustc_query_impl/src/on_disk_cache.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_query_impl/src/on_disk_cache.rs b/compiler/rustc_query_impl/src/on_disk_cache.rs
index 5ef95911f56..0e93f3ce1d6 100644
--- a/compiler/rustc_query_impl/src/on_disk_cache.rs
+++ b/compiler/rustc_query_impl/src/on_disk_cache.rs
@@ -798,6 +798,12 @@ impl<'a, 'tcx> Decodable<CacheDecoder<'a, 'tcx>> for &'tcx FxHashSet<LocalDefId>
     }
 }
 
+impl<'a, 'tcx> Decodable<CacheDecoder<'a, 'tcx>> for &'tcx FxHashMap<DefId, Ty<'tcx>> {
+    fn decode(d: &mut CacheDecoder<'a, 'tcx>) -> Self {
+        RefDecodable::decode(d)
+    }
+}
+
 impl<'a, 'tcx> Decodable<CacheDecoder<'a, 'tcx>>
     for &'tcx IndexVec<mir::Promoted, mir::Body<'tcx>>
 {