about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-21 19:05:08 +0000
committerbors <bors@rust-lang.org>2024-04-21 19:05:08 +0000
commit1b3fba066c21e7c3471fca710783fc1e6546a1ca (patch)
tree0e936e66f719a601a24c71c1bdc779837ee3f9cd /compiler/rustc_builtin_macros/src/lib.rs
parentf22a0c2d9f9cd83dfe84b65e9fa1b3fa8303c7b5 (diff)
parent5a2b335e498202e4470ccccd6cc32b0b4133738e (diff)
downloadrust-1b3fba066c21e7c3471fca710783fc1e6546a1ca.tar.gz
rust-1b3fba066c21e7c3471fca710783fc1e6546a1ca.zip
Auto merge of #124203 - lukas-code:delete-deleting-caches, r=compiler-errors
fix normalizing in different `ParamEnv`s with the same `InferCtxt`

This PR changes the key of the projection cache from just `AliasTy` to `(AliasTy, ParamEnv)` to allow normalizing in different `ParamEnv`s without resetting caches. Previously, normalizing the same alias in different param envs would always reuse the cached result from the first normalization, which is incorrect if the projection clauses in the param env have changed.

Fixing this bug allows us to get rid of `InferCtxt::clear_caches`, which was only used by the `AutoTraitFinder`, because it requires normalizing in different param envs.

r? `@fmease`
Diffstat (limited to 'compiler/rustc_builtin_macros/src/lib.rs')
0 files changed, 0 insertions, 0 deletions