diff options
| author | jackh726 <git@jackhuey.me> | 2025-09-28 23:04:55 +0000 |
|---|---|---|
| committer | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2025-09-30 12:58:28 -0400 |
| commit | d1bbd39c59523d7a5499816a9da200a5910f8b7f (patch) | |
| tree | 7838d10fbefd94f88ca80892648422a8336f433f /compiler/rustc_public/src | |
| parent | 6f34f4ee074ce0affc7bbf4e2c835f66cd576f13 (diff) | |
| download | rust-d1bbd39c59523d7a5499816a9da200a5910f8b7f.tar.gz rust-d1bbd39c59523d7a5499816a9da200a5910f8b7f.zip | |
Split Bound into Canonical and Bound
Diffstat (limited to 'compiler/rustc_public/src')
| -rw-r--r-- | compiler/rustc_public/src/unstable/convert/stable/ty.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_public/src/unstable/convert/stable/ty.rs b/compiler/rustc_public/src/unstable/convert/stable/ty.rs index 7f14f878d37..59440e5407f 100644 --- a/compiler/rustc_public/src/unstable/convert/stable/ty.rs +++ b/compiler/rustc_public/src/unstable/convert/stable/ty.rs @@ -453,7 +453,10 @@ impl<'tcx> Stable<'tcx> for ty::TyKind<'tcx> { TyKind::Alias(alias_kind.stable(tables, cx), alias_ty.stable(tables, cx)) } ty::Param(param_ty) => TyKind::Param(param_ty.stable(tables, cx)), - ty::Bound(debruijn_idx, bound_ty) => { + ty::Bound(ty::BoundVarIndexKind::Canonical, _) => { + unreachable!() + } + ty::Bound(ty::BoundVarIndexKind::Bound(debruijn_idx), bound_ty) => { TyKind::Bound(debruijn_idx.as_usize(), bound_ty.stable(tables, cx)) } ty::CoroutineWitness(def_id, args) => TyKind::RigidTy(RigidTy::CoroutineWitness( @@ -907,7 +910,7 @@ impl<'tcx> Stable<'tcx> for ty::RegionKind<'tcx> { index: early_reg.index, name: early_reg.name.to_string(), }), - ty::ReBound(db_index, bound_reg) => RegionKind::ReBound( + ty::ReBound(ty::BoundVarIndexKind::Bound(db_index), bound_reg) => RegionKind::ReBound( db_index.as_u32(), BoundRegion { var: bound_reg.var.as_u32(), |
