@@ -478,7 +478,6 @@ pub enum StatementKind {
478478 Assign ( Place , Rvalue ) ,
479479 FakeRead ( FakeReadCause , Place ) ,
480480 SetDiscriminant { place : Place , variant_index : VariantIdx } ,
481- Deinit ( Place ) ,
482481 StorageLive ( Local ) ,
483482 StorageDead ( Local ) ,
484483 Retag ( RetagKind , Place ) ,
@@ -836,14 +835,6 @@ pub enum ProjectionElem {
836835 /// Like an explicit cast from an opaque type to a concrete type, but without
837836 /// requiring an intermediate variable.
838837 OpaqueCast ( Ty ) ,
839-
840- /// A `Subtype(T)` projection is applied to any `StatementKind::Assign` where
841- /// type of lvalue doesn't match the type of rvalue, the primary goal is making subtyping
842- /// explicit during optimizations and codegen.
843- ///
844- /// This projection doesn't impact the runtime behavior of the program except for potentially changing
845- /// some type metadata of the interpreter or codegen backend.
846- Subtype ( Ty ) ,
847838}
848839
849840#[ derive( Clone , Debug , Eq , PartialEq , Serialize ) ]
@@ -1028,6 +1019,7 @@ pub enum CastKind {
10281019 PtrToPtr ,
10291020 FnPtrToPtr ,
10301021 Transmute ,
1022+ Subtype ,
10311023}
10321024
10331025#[ derive( Clone , Debug , Eq , PartialEq , Hash , Serialize ) ]
@@ -1089,7 +1081,7 @@ impl ProjectionElem {
10891081 Self :: subslice_ty ( ty, * from, * to, * from_end)
10901082 }
10911083 ProjectionElem :: Downcast ( _) => Ok ( ty) ,
1092- ProjectionElem :: OpaqueCast ( ty) | ProjectionElem :: Subtype ( ty ) => Ok ( * ty) ,
1084+ ProjectionElem :: OpaqueCast ( ty) => Ok ( * ty) ,
10931085 }
10941086 }
10951087
0 commit comments