Skip to content

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

@nikomatsakis

Description

@nikomatsakis

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.

Metadata

Metadata

Assignees

Labels

C-chalk-solveIssues related to the chalk-solve crate

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions