Skip to content

Commit c2158a4

Browse files
generic smir stable impl for Binder
1 parent 8771282 commit c2158a4

File tree

1 file changed

+7
-3
lines changed
  • compiler/rustc_smir/src/rustc_smir

1 file changed

+7
-3
lines changed

compiler/rustc_smir/src/rustc_smir/mod.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -525,13 +525,17 @@ impl<'tcx> Stable<'tcx> for ty::GenericArgs<'tcx> {
525525
}
526526
}
527527

528-
impl<'tcx> Stable<'tcx> for ty::PolyFnSig<'tcx> {
529-
type T = stable_mir::ty::PolyFnSig;
528+
impl<'tcx, S, V> Stable<'tcx> for ty::Binder<'tcx, S>
529+
where
530+
S: Stable<'tcx, T = V>,
531+
{
532+
type T = stable_mir::ty::Binder<V>;
533+
530534
fn stable(&self, tables: &mut Tables<'tcx>) -> Self::T {
531535
use stable_mir::ty::Binder;
532536

533537
Binder {
534-
value: self.skip_binder().stable(tables),
538+
value: self.as_ref().skip_binder().stable(tables),
535539
bound_vars: self
536540
.bound_vars()
537541
.iter()

0 commit comments

Comments
 (0)