1
Fork 0

Auto merge of #117908 - lcnr:region-kind-rename, r=BoxyUwU

finish `RegionKind` renaming

second step of https://github.com/rust-lang/types-team/issues/95

continues the work from #117876. While working on this and I encountered a bunch of further cleanup which I'll either open a tracking issue for or will do in a separate PR:
- rewrite the `RegionKind` docs, they still talk about `ReEmpty` and are generally out of date
- rename `DescriptionCtx` to `DescriptionCtxt`
- what is `CheckRegions::Bound`?
- `collect_late_bound_regions` et al
- `erase_late_bound_regions` -> `instantiate_bound_regions_with_erased`?
- `EraseEarlyRegions` visitor should be removed, feels duplicate

r? `@BoxyUwU`
This commit is contained in:
bors 2023-11-15 12:55:42 +00:00
commit 1500db7314
61 changed files with 301 additions and 275 deletions

View file

@ -9,7 +9,7 @@
use crate::rustc_internal::{IndexMap, RustcInternal};
use crate::rustc_smir::hir::def::DefKind;
use crate::rustc_smir::stable_mir::ty::{BoundRegion, EarlyBoundRegion, Region};
use crate::rustc_smir::stable_mir::ty::{BoundRegion, EarlyParamRegion, Region};
use rustc_hir as hir;
use rustc_middle::mir;
use rustc_middle::mir::interpret::{alloc_range, AllocId};
@ -1729,7 +1729,7 @@ impl<'tcx> Stable<'tcx> for ty::RegionKind<'tcx> {
fn stable(&self, tables: &mut Tables<'tcx>) -> Self::T {
use stable_mir::ty::RegionKind;
match self {
ty::ReEarlyBound(early_reg) => RegionKind::ReEarlyBound(EarlyBoundRegion {
ty::ReEarlyParam(early_reg) => RegionKind::ReEarlyParam(EarlyParamRegion {
def_id: tables.region_def(early_reg.def_id),
index: early_reg.index,
name: early_reg.name.to_string(),