Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split some queries #19228

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Feb 26, 2025

Small step needed for #7434
Blocked on #18964

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 26, 2025
@Veykril Veykril changed the title Split assoc items out of trait_data/impl_data queries Split some queries Feb 26, 2025
@ChayimFriedman2
Copy link
Contributor

Why split them? I mean, the items & fields are not the only part that shouldn't be in the item tree, there're also the types, and when we remove them we get pretty much the same data - the new thing is the item tree, not the data queries.

@Veykril
Copy link
Member Author

Veykril commented Feb 26, 2025

See https://rust-lang.zulipchat.com/#narrow/channel/185405-t-compiler.2Frust-analyzer/topic/https.3A.2F.2Fgithub.2Ecom.2Frust-lang.2Frust-analyzer.2Fissues.2F7434/near/501477376

The gist is the data queries will turn into the "signatures" of the things (generic params, where clauses, generic args, etc) which for impls means generics, target trait (and its args which mat contain expressions) and the target type (again may contain expressions). All of that is information isn't necessary when querying the assoc items as they are separate concerns. Assoc item lowering is still just part of early name res, we just do it lazily because it doesn't quite participate in the fixpoint (yet, traits will be soon as rust will allow importing trait functions in the future).

The item tree is not really related to this concrete change here.

@Veykril
Copy link
Member Author

Veykril commented Feb 26, 2025

A follow up is to split out the VariantData (fields) from data queries of variants (struct_data, union_data, enum_variant_data), for similar reasons, they aren't part of the signature (same way current bodies aren't)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants