]> git.lizzy.rs Git - rust.git/commit
Auto merge of #89831 - Aaron1011:project-caching-speedup, r=jackh726
authorbors <bors@rust-lang.org>
Sun, 19 Dec 2021 03:33:19 +0000 (03:33 +0000)
committerbors <bors@rust-lang.org>
Sun, 19 Dec 2021 03:33:19 +0000 (03:33 +0000)
commitd6cffe41b59feaab5fb92bb320e60586202c9950
treeb139bcfeca7b9f2ed7c532922b40e811f1286d0a
parentdf2f45c1d30615c930b7aa76bb9efbeea3909703
parent40ef1d322304c8a21c675fd32886fb27ebe07039
Auto merge of #89831 - Aaron1011:project-caching-speedup, r=jackh726

Re-introduce concept of projection cache 'completion'

Instead of clearing out the cache entirely, we store
the intermediate evaluation result into the cache entry.
This accomplishes several things:

* We avoid the performance hit associated with re-evaluating
  the sub-obligations
* We avoid causing issues with incremental compilation, since
  the final evaluation result is always the same
* We avoid affecting other uses of the same `InferCtxt` which
  might care about 'side effects' from processing the sub-obligations
  (e,g. region constraints). Only code that is specifically aware
   of the new 'complete' code is affected