Closed
Description
Similar to what Oğuz did in rust-lang/rust#115534, indexed types should have debug methods that prints out more useful information like the name of the definition/variant/field.
As mentioned in rust-lang/rust#117517 (comment), this kind of debug printing is likely not possible for ProjectionElem until AdtDef
is implemented in Stable MIR. Place::ty
may also need to be implemented first to easily resolve the name of a variant/field. This is because it may be easiest to create a copy of the Place
definition with the projection elements truncated to either the desired Downcast
/Field
projection or its parent, and then just call the Place::ty
function to get the appropriate AdtDef
.