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

refactor how RustIr manages ADTs (and maybe other types) #506

Open
nikomatsakis opened this issue Jun 9, 2020 · 1 comment
Open

refactor how RustIr manages ADTs (and maybe other types) #506

nikomatsakis opened this issue Jun 9, 2020 · 1 comment
Assignees
Labels
C-chalk-solve Issues related to the chalk-solve crate

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Jun 9, 2020

Currently the RustIrDatabase trait has methods that return Arc<SomeRustIrType>, but this doesn't map that well to rustc, as it must create these awkward types. We could instead have finer-grained methods. For the case of ADTs, we might have e.g.:

  • num_variants(adt_id)
  • num_fields(adt_id, variant_index)
  • field_type(adt_id, variant_index, field_index)

This issue has been assigned to @doctorn via this comment.

@doctorn
Copy link
Contributor

doctorn commented Jun 9, 2020

@rustbot claim

@rustbot rustbot self-assigned this Jun 9, 2020
@jackh726 jackh726 added the C-chalk-solve Issues related to the chalk-solve crate label Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-chalk-solve Issues related to the chalk-solve crate
Projects
None yet
Development

No branches or pull requests

4 participants