Skip to content

Commit 059bd80

Browse files
incr.comp.: Load diagnostics from previous session lazily and clean up on-disk-cache persistence code.
1 parent 64e1093 commit 059bd80

File tree

5 files changed

+159
-135
lines changed

5 files changed

+159
-135
lines changed

src/librustc/dep_graph/graph.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,10 @@ impl DepGraph {
461461
self.data.as_ref().and_then(|data| data.colors.borrow().get(dep_node).cloned())
462462
}
463463

464-
pub fn try_mark_green(&self,
465-
tcx: TyCtxt,
466-
dep_node: &DepNode)
467-
-> Option<DepNodeIndex> {
464+
pub fn try_mark_green<'a, 'tcx>(&self,
465+
tcx: TyCtxt<'a, 'tcx, 'tcx>,
466+
dep_node: &DepNode)
467+
-> Option<DepNodeIndex> {
468468
debug!("try_mark_green({:?}) - BEGIN", dep_node);
469469
let data = self.data.as_ref().unwrap();
470470

@@ -621,7 +621,7 @@ impl DepGraph {
621621
// ... emitting any stored diagnostic ...
622622
{
623623
let diagnostics = tcx.on_disk_query_result_cache
624-
.load_diagnostics(prev_dep_node_index);
624+
.load_diagnostics(tcx, prev_dep_node_index);
625625

626626
if diagnostics.len() > 0 {
627627
let handle = tcx.sess.diagnostic();

src/librustc/ty/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
12351235
-> Result<(), E::Error>
12361236
where E: ty::codec::TyEncoder
12371237
{
1238-
self.on_disk_query_result_cache.serialize(self.global_tcx(), self.cstore, encoder)
1238+
self.on_disk_query_result_cache.serialize(self.global_tcx(), encoder)
12391239
}
12401240

12411241
}

0 commit comments

Comments
 (0)