@@ -825,8 +825,10 @@ 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 ! ( ) ,
829
- ty:: Bound ( _, _) => todo ! ( ) ,
828
+ ty:: Param ( param_ty) => TyKind :: Param ( param_ty. stable ( tables) ) ,
829
+ ty:: Bound ( debruijn_idx, bound_ty) => {
830
+ TyKind :: Bound ( debruijn_idx. as_usize ( ) , bound_ty. stable ( tables) )
831
+ }
830
832
ty:: Placeholder ( ..)
831
833
| ty:: GeneratorWitness ( _)
832
834
| ty:: GeneratorWitnessMIR ( _, _)
@@ -837,3 +839,19 @@ impl<'tcx> Stable<'tcx> for Ty<'tcx> {
837
839
}
838
840
}
839
841
}
842
+
843
+ impl < ' tcx > Stable < ' tcx > for rustc_middle:: ty:: ParamTy {
844
+ type T = stable_mir:: ty:: ParamTy ;
845
+ fn stable ( & self , _: & mut Tables < ' tcx > ) -> Self :: T {
846
+ use stable_mir:: ty:: ParamTy ;
847
+ ParamTy { index : self . index , name : self . name . to_string ( ) }
848
+ }
849
+ }
850
+
851
+ impl < ' tcx > Stable < ' tcx > for rustc_middle:: ty:: BoundTy {
852
+ type T = stable_mir:: ty:: BoundTy ;
853
+ fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
854
+ use stable_mir:: ty:: BoundTy ;
855
+ BoundTy { var : self . var . as_usize ( ) , kind : self . kind . stable ( tables) }
856
+ }
857
+ }
0 commit comments