-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Make traits_in_crate and impls_in_crate proper queries and use them #95092
Copy link
Copy link
Open
Labels
A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
We currently compute a list of all traits and all impls in a crate for metadata.
traits_in_crateis a query, and sorts all definitions byDefPathHash.impls_in_crateis not a query, and sorts definitions byDefPathHash.This PR suggests to:
traits_in_cratefrom the query to metadata encoding;traits_in_cratefor all analyses that iterate on traits;impls_in_cratea query, keeping the sorting outside of the query in metadata encoding;impls_in_cratefor analyses that iterate on impls, like coherence.The effect of the sorting on the definitions by
DefPathHashis 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.