@@ -3,7 +3,6 @@ use crate::mir::interpret::{AllocDecodingSession, AllocDecodingState};
3
3
use crate :: mir:: { self , interpret} ;
4
4
use crate :: ty:: codec:: { RefDecodable , TyDecoder , TyEncoder } ;
5
5
use crate :: ty:: context:: TyCtxt ;
6
- use crate :: ty:: query:: QueryCtxt ;
7
6
use crate :: ty:: { self , Ty } ;
8
7
use rustc_data_structures:: fingerprint:: { Fingerprint , FingerprintDecoder , FingerprintEncoder } ;
9
8
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet , FxIndexSet } ;
@@ -15,6 +14,8 @@ use rustc_hir::def_id::{CrateNum, DefId, DefIndex, LocalDefId, LOCAL_CRATE};
15
14
use rustc_hir:: definitions:: DefPathHash ;
16
15
use rustc_hir:: definitions:: Definitions ;
17
16
use rustc_index:: vec:: { Idx , IndexVec } ;
17
+ use rustc_query_system:: dep_graph:: DepContext ;
18
+ use rustc_query_system:: query:: QueryContext ;
18
19
use rustc_serialize:: {
19
20
opaque:: { self , FileEncodeResult , FileEncoder } ,
20
21
Decodable , Decoder , Encodable , Encoder ,
@@ -1215,18 +1216,19 @@ impl<'a> Decodable<opaque::Decoder<'a>> for IntEncodedWithFixedSize {
1215
1216
}
1216
1217
}
1217
1218
1218
- pub fn encode_query_results < ' a , ' tcx , Q > (
1219
- tcx : QueryCtxt < ' tcx > ,
1219
+ pub fn encode_query_results < ' a , ' tcx , CTX , Q > (
1220
+ tcx : CTX ,
1220
1221
encoder : & mut CacheEncoder < ' a , ' tcx , FileEncoder > ,
1221
1222
query_result_index : & mut EncodedQueryResultIndex ,
1222
1223
) -> FileEncodeResult
1223
1224
where
1224
- Q : super :: QueryDescription < QueryCtxt < ' tcx > > + super :: QueryAccessors < QueryCtxt < ' tcx > > ,
1225
+ CTX : QueryContext + ' tcx ,
1226
+ Q : super :: QueryDescription < CTX > + super :: QueryAccessors < CTX > ,
1225
1227
Q :: Value : Encodable < CacheEncoder < ' a , ' tcx , FileEncoder > > ,
1226
1228
{
1227
1229
let _timer = tcx
1228
- . sess
1229
- . prof
1230
+ . dep_context ( )
1231
+ . profiler ( )
1230
1232
. extra_verbose_generic_activity ( "encode_query_results_for" , std:: any:: type_name :: < Q > ( ) ) ;
1231
1233
1232
1234
assert ! ( Q :: query_state( tcx) . all_inactive( ) ) ;
0 commit comments