Files
rust/compiler/rustc_ty_utils
Jonathan Brouwer 79721d53db Rollup merge of #160509 - Jamesbarford:chore/shrink-region-ext-triats-pt2, r=lcnr
Remove `RegionExt`; move methods to `Region` in `rustc_type_ir`

Removes `RegionExt` from `rustc_middle` with all methods on `Region`.

Some changes I think are worth pointing out (of which are all in the first commit -> f949bb7183e75bd027f01a51c3cf8ea9b3052ed2) ;

- Changed the signature of `Region::new_late_param` to accept a `I::LateParamRegion` where previously it was able to construct a `LateParamRegion` from some method parameters.

**added to interner:**
- `fn span_delayed_bug(self, span: Self::Span, msg: impl ToString) -> Self::ErrorGuaranteed;` which could be useful elsewhere when porting things across to `rustc_type_ir`
- `fn generics_of_early_param_region_def_id(self, def_id: Self::DefId, ebr: Self::EarlyParamRegion) -> Self::DefId;` which is quite nasty but calling `generics_of` returned another type that I would have possibly create a trait for which felt more messy.
- `fn get_re_var_lifetime(self, var_idx: usize) -> Option<Region<'tcx>>` need to get a region in `Region::new_var`.

**traits added to inherent**
- `RegionName` so we can get the names of `LateParamRegion` and `EarlyParamRegion` with a `get_name()` and also `is_named()`.
- `DefIdGetter` so we can get the `DefId` of `kind` in `LateParamRegion`

r? lcnr

Part of https://github.com/rust-lang/rust/issues/159654
2026-09-04 22:29:05 +02:00
..
2026-08-21 10:33:56 +02:00