Remove rustc_query_system::cache.#152199
Open
nnethercote wants to merge 1 commit intorust-lang:mainfrom
Open
Conversation
It only defines two types, `Cache` and `WithDepNode`. Neither has anything much to do with queries -- they use `DepNodeIndex`, that's all. This commit moves them into `rustc_middle`, to where they are used. It also renames the extremely non-descriptive `Cache` as `WithDepNodeCache`.
Member
|
This looks like a chunk of code that would immediately make sense to extract as a submodule, so moving it inline into |
Zalathar
reviewed
Feb 6, 2026
| /// Caches the results of trait selection. This cache is used | ||
| /// for things that do not have to do with the parameters in scope. | ||
| pub selection_cache: traits::SelectionCache<'tcx, ty::TypingEnv<'tcx>>, | ||
| pub selection_cache: SelectionCache<'tcx, ty::TypingEnv<'tcx>>, |
Member
There was a problem hiding this comment.
Nit: Given that GlobalCtxt holds a lot of different things, the traits:: prefix is providing helpful context, so I don't see a benefit in removing it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It only defines two types,
CacheandWithDepNode. Neither has anything much to do with queries -- they useDepNodeIndex, that's all.This commit moves them into
rustc_middle, to where they are used. It also renames the extremely non-descriptiveCacheasWithDepNodeCache.r? @Zalathar