Skip to content

Commit 5d72f73

Browse files
committed
Split Bound into Canonical and Bound
1 parent 8d9b614 commit 5d72f73

File tree

1 file changed

+5
-2
lines changed
  • compiler/rustc_public/src/unstable/convert/stable

1 file changed

+5
-2
lines changed

compiler/rustc_public/src/unstable/convert/stable/ty.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,10 @@ impl<'tcx> Stable<'tcx> for ty::TyKind<'tcx> {
453453
TyKind::Alias(alias_kind.stable(tables, cx), alias_ty.stable(tables, cx))
454454
}
455455
ty::Param(param_ty) => TyKind::Param(param_ty.stable(tables, cx)),
456-
ty::Bound(debruijn_idx, bound_ty) => {
456+
ty::Bound(ty::BoundVarIndexKind::Canonical, _) => {
457+
unreachable!()
458+
}
459+
ty::Bound(ty::BoundVarIndexKind::Bound(debruijn_idx), bound_ty) => {
457460
TyKind::Bound(debruijn_idx.as_usize(), bound_ty.stable(tables, cx))
458461
}
459462
ty::CoroutineWitness(def_id, args) => TyKind::RigidTy(RigidTy::CoroutineWitness(
@@ -907,7 +910,7 @@ impl<'tcx> Stable<'tcx> for ty::RegionKind<'tcx> {
907910
index: early_reg.index,
908911
name: early_reg.name.to_string(),
909912
}),
910-
ty::ReBound(db_index, bound_reg) => RegionKind::ReBound(
913+
ty::ReBound(ty::BoundVarIndexKind::Bound(db_index), bound_reg) => RegionKind::ReBound(
911914
db_index.as_u32(),
912915
BoundRegion {
913916
var: bound_reg.var.as_u32(),

0 commit comments

Comments
 (0)