diff --git a/compiler/rustc_smir/src/rustc_smir/mod.rs b/compiler/rustc_smir/src/rustc_smir/mod.rs index 2623ce8fd11..3b6bacaa168 100644 --- a/compiler/rustc_smir/src/rustc_smir/mod.rs +++ b/compiler/rustc_smir/src/rustc_smir/mod.rs @@ -8,7 +8,7 @@ //! For now, we are developing everything inside `rustc`, thus, we keep this module private. use crate::rustc_smir::hir::def::DefKind; -use crate::rustc_smir::stable_mir::ty::{BoundRegion, EarlyBoundRegion, FreeRegion, Region}; +use crate::rustc_smir::stable_mir::ty::{BoundRegion, EarlyBoundRegion, Region}; use rustc_hir as hir; use rustc_middle::mir; use rustc_middle::mir::interpret::{alloc_range, AllocId}; @@ -1521,12 +1521,7 @@ impl<'tcx> Stable<'tcx> for ty::RegionKind<'tcx> { db_index.as_u32(), BoundRegion { var: bound_reg.var.as_u32(), kind: bound_reg.kind.stable(tables) }, ), - ty::ReFree(free_reg) => RegionKind::ReFree(FreeRegion { - scope: tables.region_def(free_reg.scope), - bound_region: free_reg.bound_region.stable(tables), - }), ty::ReStatic => RegionKind::ReStatic, - ty::ReVar(vid_reg) => RegionKind::ReVar(vid_reg.as_u32()), ty::RePlaceholder(place_holder) => { RegionKind::RePlaceholder(stable_mir::ty::Placeholder { universe: place_holder.universe.as_u32(), @@ -1537,7 +1532,7 @@ impl<'tcx> Stable<'tcx> for ty::RegionKind<'tcx> { }) } ty::ReErased => RegionKind::ReErased, - ty::ReError(_) => RegionKind::ReError(()), + _=> unimplemented!() } } } diff --git a/compiler/stable_mir/src/ty.rs b/compiler/stable_mir/src/ty.rs index 20ef514e4ab..6029e3c11ad 100644 --- a/compiler/stable_mir/src/ty.rs +++ b/compiler/stable_mir/src/ty.rs @@ -44,12 +44,9 @@ pub struct Region { pub enum RegionKind { ReEarlyBound(EarlyBoundRegion), ReLateBound(DebruijnIndex, BoundRegion), - ReFree(FreeRegion), ReStatic, - ReVar(RegionVid), RePlaceholder(Placeholder), ReErased, - ReError(ErrorGuaranteed), } pub(crate) type DebruijnIndex = u32; @@ -69,14 +66,6 @@ pub struct BoundRegion { pub kind: BoundRegionKind, } -#[derive(Debug, Clone)] -pub struct FreeRegion { - pub scope: RegionDef, - pub bound_region: BoundRegionKind, -} - -pub(crate) type RegionVid = u32; - pub(crate) type UniverseIndex = u32; #[derive(Debug, Clone)] @@ -85,8 +74,6 @@ pub struct Placeholder { pub bound: T, } -pub(crate) type ErrorGuaranteed = (); - #[derive(Clone, Copy, PartialEq, Eq)] pub struct Span(pub usize);