Chalk currently has a notion of struct types but rustc has the more general adt. Also, chalk expects a DefId but in rustc we use an AdtDef (a pointer to an interned structure).
We should align with rustc here:
- Rename
TypeName::Struct to TypeName::Adt
- Rename
StructId<I> to AdtId<I>
- Extend
Interner trait to have I::InternedAdtId and adapt AdtId<I> to be a wrapper around InternedAdtId (instead of I::DefId, as today)
- We can map
InternedAdtId to the same type as DefId in our integration, rustc can use &'tcx AdtDef
- Rename
StructDatum and StructDatumBound to use the Adt terminology -- we don't actually have to change the list of fields for now, though eventually we may want to do so to allow rustc to more cheaply give access from the AdtDef
This issue has been assigned to @Mcat12 via this comment.
Chalk currently has a notion of struct types but rustc has the more general adt. Also, chalk expects a
DefIdbut in rustc we use anAdtDef(a pointer to an interned structure).We should align with rustc here:
TypeName::StructtoTypeName::AdtStructId<I>toAdtId<I>Internertrait to haveI::InternedAdtIdand adaptAdtId<I>to be a wrapper aroundInternedAdtId(instead ofI::DefId, as today)InternedAdtIdto the same type asDefIdin our integration, rustc can use&'tcx AdtDefStructDatumandStructDatumBoundto use theAdtterminology -- we don't actually have to change the list of fields for now, though eventually we may want to do so to allow rustc to more cheaply give access from theAdtDefThis issue has been assigned to @Mcat12 via this comment.