Make traits_in_crate
and impls_in_crate
proper queries and use them
#95092
Labels
A-query-system
Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)
E-help-wanted
Call for participation: Help is requested to fix this issue.
E-medium
Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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 byDefPathHash
.impls_in_crate
is not a query, and sorts definitions byDefPathHash
.This PR suggests to:
traits_in_crate
from the query to metadata encoding;traits_in_crate
for all analyses that iterate on traits;impls_in_crate
a query, keeping the sorting outside of the query in metadata encoding;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 thecrate_hash
.This issue may conflict with #94878, #95004 and #95082.
I am available on Zulip for further information.
The text was updated successfully, but these errors were encountered: