diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-02-07 08:32:30 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-04-06 08:25:52 +0200 |
| commit | 785459d630a129c4007e865b3c907cd5c469d604 (patch) | |
| tree | 5fc8c9f7ba082b77401631a13e34ddc715ec12cc /compiler/rustc_query_impl/src/on_disk_cache.rs | |
| parent | f211da7101a3c91f0afc23436abbcd3bd1d40d2b (diff) | |
| download | rust-785459d630a129c4007e865b3c907cd5c469d604.tar.gz rust-785459d630a129c4007e865b3c907cd5c469d604.zip | |
Erase query cache values
Diffstat (limited to 'compiler/rustc_query_impl/src/on_disk_cache.rs')
| -rw-r--r-- | compiler/rustc_query_impl/src/on_disk_cache.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_query_impl/src/on_disk_cache.rs b/compiler/rustc_query_impl/src/on_disk_cache.rs index 35b7e5919e4..4d64517d4a3 100644 --- a/compiler/rustc_query_impl/src/on_disk_cache.rs +++ b/compiler/rustc_query_impl/src/on_disk_cache.rs @@ -13,6 +13,7 @@ use rustc_middle::mir::{self, interpret}; use rustc_middle::ty::codec::{RefDecodable, TyDecoder, TyEncoder}; use rustc_middle::ty::{self, Ty, TyCtxt}; use rustc_query_system::dep_graph::DepContext; +use rustc_query_system::query::QueryConfig; use rustc_query_system::query::{QueryCache, QuerySideEffects}; use rustc_serialize::{ opaque::{FileEncodeResult, FileEncoder, IntEncodedWithFixedSize, MemDecoder}, @@ -1064,13 +1065,13 @@ impl<'a, 'tcx> Encodable<CacheEncoder<'a, 'tcx>> for [u8] { } } -pub fn encode_query_results<'a, 'tcx, Q>( - query: Q, +pub(crate) fn encode_query_results<'a, 'tcx, Q>( + query: Q::Config, qcx: QueryCtxt<'tcx>, encoder: &mut CacheEncoder<'a, 'tcx>, query_result_index: &mut EncodedDepNodeIndex, ) where - Q: super::QueryConfig<QueryCtxt<'tcx>>, + Q: super::QueryToConfig<'tcx>, Q::Value: Encodable<CacheEncoder<'a, 'tcx>>, { let _timer = qcx @@ -1089,7 +1090,7 @@ pub fn encode_query_results<'a, 'tcx, Q>( // Encode the type check tables with the `SerializedDepNodeIndex` // as tag. - encoder.encode_tagged(dep_node, value); + encoder.encode_tagged(dep_node, &Q::restore(*value)); } }); } |
