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

Merged
merged 4 commits into from
Mar 14, 2025
Merged

Split some queries #19228

merged 4 commits into from
Mar 14, 2025

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
@Veykril Veykril force-pushed the push-xxplutrwplou branch 2 times, most recently from 4e741e3 to 29511a6 Compare February 26, 2025 07:27
@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)

@Veykril Veykril force-pushed the push-xxplutrwplou branch from e9bb324 to 1f5c29f Compare March 14, 2025 12:46
@Veykril Veykril enabled auto-merge March 14, 2025 12:48
@Veykril Veykril force-pushed the push-xxplutrwplou branch from 1f5c29f to 2ea09b2 Compare March 14, 2025 13:17
@Veykril Veykril added this pull request to the merge queue Mar 14, 2025
Merged via the queue into rust-lang:master with commit 60cd018 Mar 14, 2025
9 checks passed
@Veykril Veykril deleted the push-xxplutrwplou branch March 14, 2025 13:50
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