diff --git a/compiler/rustc_smir/src/rustc_smir/mod.rs b/compiler/rustc_smir/src/rustc_smir/mod.rs
index c4bdec0ee28..e377843cdb4 100644
--- a/compiler/rustc_smir/src/rustc_smir/mod.rs
+++ b/compiler/rustc_smir/src/rustc_smir/mod.rs
@@ -1063,3 +1063,34 @@ fn stable(&self, tables: &mut Tables<'tcx>) -> Self::T {
BoundTy { var: self.var.as_usize(), kind: self.kind.stable(tables) }
}
}
+
+impl<'tcx> Stable<'tcx> for mir::interpret::Allocation {
+ type T = stable_mir::ty::Allocation;
+
+ fn stable(&self, tables: &mut Tables<'tcx>) -> Self::T {
+ let size = self.size();
+ let mut bytes: Vec