Tweak query key trait bounds.
Query keys must be stably hashable. Currently this requirement is expressed as a where-clause on `impl QueryDispatcher for SemiDynamicQueryDispatcher` and a where-clause on `create_deferred_query_stack_frame`. This commit removes those where-clause bounds and adds a single bound to `QueryCache::Key`, which already has some other bounds. I.e. it consolidates the bounds. It also gives them a name (`QueryCacheKey`) to avoid repeating them. There is also a related `Key` trait in `rustc_middle`; it should probably be merged with `QueryCacheKey` in the future, but not today. This cleanup helps with the next two commits, which do bigger rearrangements, and where the where-clauses caused me some difficulties.
This commit is contained in:
parent
286fbe5d84
commit
d3d4fd9312
5 changed files with 13 additions and 10 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#![allow(internal_features)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(min_specialization)]
|
||||
#![feature(trait_alias)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
pub mod dep_graph;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue