]> git.lizzy.rs Git - rust.git/commit
Auto merge of #88994 - Aaron1011:intercrate-caching, r=jackh726
authorbors <bors@rust-lang.org>
Sat, 18 Sep 2021 17:18:28 +0000 (17:18 +0000)
committerbors <bors@rust-lang.org>
Sat, 18 Sep 2021 17:18:28 +0000 (17:18 +0000)
commit35c8f2612ffea42cc09350accdba934e85a19f35
tree35b8163b863a91938354e1450e8417c92e7b210d
parentd6cd2c6c877110748296760aefddc21a0ea1d316
parent6d1f4d2fed2bdc561891d19440c38cf7adfb4858
Auto merge of #88994 - Aaron1011:intercrate-caching, r=jackh726

Disable the evaluation cache when in intercrate mode

It's possible to use the same `InferCtxt` with both
an intercrate and non-intercrate `SelectionContext`. However,
the local (inferctxt) evaluation cache is not aware of this
distinction, so this kind of `InferCtxt` re-use will pollute
the cache wth bad results.

This commit avoids the issue by disabling the evaluation cache
entirely during intercrate mode.
compiler/rustc_trait_selection/src/traits/select/mod.rs