This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -826,7 +826,9 @@ impl<'tcx> Stable<'tcx> for Ty<'tcx> {
826826 TyKind :: Alias ( alias_kind. stable ( tables) , alias_ty. stable ( tables) )
827827 }
828828 ty:: Param ( param_ty) => TyKind :: Param ( param_ty. stable ( tables) ) ,
829- ty:: Bound ( _, _) => todo ! ( ) ,
829+ ty:: Bound ( debruijn_idx, bound_ty) => {
830+ TyKind :: Bound ( debruijn_idx. as_usize ( ) , bound_ty. stable ( tables) )
831+ }
830832 ty:: Placeholder ( ..)
831833 | ty:: GeneratorWitness ( _)
832834 | ty:: GeneratorWitnessMIR ( _, _)
@@ -845,3 +847,11 @@ impl<'tcx> Stable<'tcx> for rustc_middle::ty::ParamTy {
845847 ParamTy { index : self . index , name : self . name . to_string ( ) }
846848 }
847849}
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+ }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ pub enum TyKind {
1919 RigidTy ( RigidTy ) ,
2020 Alias ( AliasKind , AliasTy ) ,
2121 Param ( ParamTy ) ,
22+ Bound ( usize , BoundTy ) ,
2223}
2324
2425#[ derive( Clone , Debug ) ]
@@ -235,3 +236,9 @@ pub struct ParamTy {
235236 pub index : u32 ,
236237 pub name : String ,
237238}
239+
240+ #[ derive( Clone , Debug ) ]
241+ pub struct BoundTy {
242+ pub var : usize ,
243+ pub kind : BoundTyKind ,
244+ }
You can’t perform that action at this time.
0 commit comments