Make UserTypeProjection projections Opaque
Also shifts comments explaining why Stable MIR drops an optional variant name field, for `Downcast` projection elements, to the `Place::stable` function.
This commit is contained in:
parent
ae1726bfce
commit
c036a10ed5
2 changed files with 7 additions and 6 deletions
|
@ -465,10 +465,6 @@ pub enum ProjectionElem {
|
|||
},
|
||||
|
||||
/// "Downcast" to a variant of an enum or a coroutine.
|
||||
//
|
||||
// TODO(klinvill): MIR includes an Option<Symbol> argument that is the name of the variant, used
|
||||
// for printing MIR. However I don't see it used anywhere. Is such a field needed or can we just
|
||||
// include the VariantIdx which could be used to recover the field name if needed?
|
||||
Downcast(VariantIdx),
|
||||
|
||||
/// Like an explicit cast from an opaque type to a concrete type, but without
|
||||
|
@ -488,7 +484,7 @@ pub enum ProjectionElem {
|
|||
pub struct UserTypeProjection {
|
||||
pub base: UserTypeAnnotationIndex,
|
||||
|
||||
pub projection: String,
|
||||
pub projection: Opaque,
|
||||
}
|
||||
|
||||
pub type Local = usize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue