提交 16d17003 编写于 作者: A Ariel Ben-Yehuda 提交者: Niko Matsakis

use dep-graph reads for the evaluation cache

This is just duplicating the logic from the old fulfillment cache, so
I'm not sure it is 100% correct, but it should not be more wrong than
the old logic.
上级 14875fd3
......@@ -791,6 +791,10 @@ fn check_evaluation_cache(&self,
if self.can_use_global_caches(param_env) {
let cache = self.tcx().evaluation_cache.hashmap.borrow();
if let Some(cached) = cache.get(&trait_ref) {
let dep_node = trait_ref
.to_poly_trait_predicate()
.dep_node(self.tcx());
self.tcx().hir.dep_graph.read(dep_node);
return Some(cached.clone());
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册