Remove RegionExt; move methods to Region in rustc_type_ir - #160509
Open
Jamesbarford wants to merge 2 commits into
Open
Remove RegionExt; move methods to Region in rustc_type_ir#160509Jamesbarford wants to merge 2 commits into
RegionExt; move methods to Region in rustc_type_ir#160509Jamesbarford wants to merge 2 commits into
Conversation
Collaborator
|
HIR ty lowering was modified cc @fmease |
fbstj
reviewed
Aug 4, 2026
Contributor
generics_of_early_param_region_def_idhmm, without looking much at the code, I feel like we should move |
lcnr
reviewed
Aug 4, 2026
lcnr
reviewed
Aug 4, 2026
This comment has been minimized.
This comment has been minimized.
Jamesbarford
force-pushed
the
chore/shrink-region-ext-triats-pt2
branch
from
August 6, 2026 08:05
d2eb2a2 to
78adf31
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Contributor
|
☔ The latest upstream changes (presumably #160627) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes
RegionExtfromrustc_middlewith all methods onRegion.Some changes I think are worth pointing out (of which are all in the first commit -> f949bb7) ;
Region::new_late_paramto accept aI::LateParamRegionwhere previously it was able to construct aLateParamRegionfrom 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 torustc_type_irfn generics_of_early_param_region_def_id(self, def_id: Self::DefId, ebr: Self::EarlyParamRegion) -> Self::DefId;which is quite nasty but callinggenerics_ofreturned 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 inRegion::new_var.traits added to inherent
RegionNameso we can get the names ofLateParamRegionandEarlyParamRegionwith aget_name()and alsois_named().DefIdGetterso we can get theDefIdofkindinLateParamRegionr? lcnr
Part of #159654