Open
Description
We currently compute a list of all traits and all impls in a crate for metadata.
traits_in_crate
is a query, and sorts all definitions by DefPathHash
.
impls_in_crate
is not a query, and sorts definitions by DefPathHash
.
This PR suggests to:
- shift the sorting of
traits_in_crate
from the query to metadata encoding; - use
traits_in_crate
for all analyses that iterate on traits; - make
impls_in_crate
a query, keeping the sorting outside of the query in metadata encoding; - use
impls_in_crate
for analyses that iterate on impls, like coherence.
The effect of the sorting on the definitions by DefPathHash
is not obvious. The effect of sorting vs not sorting will need to investigated with respect to soundness of the crate_hash
.
This issue may conflict with #94878, #95004 and #95082.
I am available on Zulip for further information.
Metadata
Metadata
Assignees
Labels
Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)Call for participation: Help is requested to fix this issue.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.