File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -825,7 +825,7 @@ impl<'tcx> Stable<'tcx> for Ty<'tcx> {
825
825
ty:: Alias ( alias_kind, alias_ty) => {
826
826
TyKind :: Alias ( alias_kind. stable ( tables) , alias_ty. stable ( tables) )
827
827
}
828
- ty:: Param ( _ ) => todo ! ( ) ,
828
+ ty:: Param ( param_ty ) => TyKind :: Param ( param_ty . stable ( tables ) ) ,
829
829
ty:: Bound ( _, _) => todo ! ( ) ,
830
830
ty:: Placeholder ( ..)
831
831
| ty:: GeneratorWitness ( _)
@@ -837,3 +837,11 @@ impl<'tcx> Stable<'tcx> for Ty<'tcx> {
837
837
}
838
838
}
839
839
}
840
+
841
+ impl < ' tcx > Stable < ' tcx > for rustc_middle:: ty:: ParamTy {
842
+ type T = stable_mir:: ty:: ParamTy ;
843
+ fn stable ( & self , _: & mut Tables < ' tcx > ) -> Self :: T {
844
+ use stable_mir:: ty:: ParamTy ;
845
+ ParamTy { index : self . index , name : self . name . to_string ( ) }
846
+ }
847
+ }
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ type Span = Opaque;
18
18
pub enum TyKind {
19
19
RigidTy ( RigidTy ) ,
20
20
Alias ( AliasKind , AliasTy ) ,
21
+ Param ( ParamTy ) ,
21
22
}
22
23
23
24
#[ derive( Clone , Debug ) ]
@@ -228,3 +229,9 @@ pub struct ExistentialProjection {
228
229
pub generic_args : GenericArgs ,
229
230
pub term : TermKind ,
230
231
}
232
+
233
+ #[ derive( Clone , Debug ) ]
234
+ pub struct ParamTy {
235
+ pub index : u32 ,
236
+ pub name : String ,
237
+ }
You can’t perform that action at this time.
0 commit comments