mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 11:05:36 +00:00
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