generic smir stable impl for Binder

This commit is contained in:
Eric Mark Martin 2023-07-23 23:52:19 -04:00
parent 8771282d4e
commit c2158a44e1

View File

@ -525,13 +525,17 @@ impl<'tcx> Stable<'tcx> for ty::GenericArgs<'tcx> {
} }
} }
impl<'tcx> Stable<'tcx> for ty::PolyFnSig<'tcx> { impl<'tcx, S, V> Stable<'tcx> for ty::Binder<'tcx, S>
type T = stable_mir::ty::PolyFnSig; where
S: Stable<'tcx, T = V>,
{
type T = stable_mir::ty::Binder<V>;
fn stable(&self, tables: &mut Tables<'tcx>) -> Self::T { fn stable(&self, tables: &mut Tables<'tcx>) -> Self::T {
use stable_mir::ty::Binder; use stable_mir::ty::Binder;
Binder { Binder {
value: self.skip_binder().stable(tables), value: self.as_ref().skip_binder().stable(tables),
bound_vars: self bound_vars: self
.bound_vars() .bound_vars()
.iter() .iter()