Skip to content

Commit 5dcd28c

Browse files
authored
Rollup merge of #98795 - jackh726:lexical_region_resolve_cleanup, r=compiler-errors
A few cleanups Each commit is (mostly) self-explanatory. These changes have come as I try to remove `ReEmpty` (#98559).
2 parents 9c6bcb6 + 31e1a77 commit 5dcd28c

File tree

11 files changed

+585
-599
lines changed

11 files changed

+585
-599
lines changed

compiler/rustc_borrowck/src/region_infer/mod.rs

+7-11
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
495495
}
496496
}
497497

498-
NllRegionVariableOrigin::RootEmptyRegion
499-
| NllRegionVariableOrigin::Existential { .. } => {
498+
NllRegionVariableOrigin::Existential { .. } => {
500499
// For existential, regions, nothing to do.
501500
}
502501
}
@@ -1410,8 +1409,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
14101409
self.check_bound_universal_region(fr, placeholder, errors_buffer);
14111410
}
14121411

1413-
NllRegionVariableOrigin::RootEmptyRegion
1414-
| NllRegionVariableOrigin::Existential { .. } => {
1412+
NllRegionVariableOrigin::Existential { .. } => {
14151413
// nothing to check here
14161414
}
14171415
}
@@ -1513,8 +1511,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
15131511
self.check_bound_universal_region(fr, placeholder, errors_buffer);
15141512
}
15151513

1516-
NllRegionVariableOrigin::RootEmptyRegion
1517-
| NllRegionVariableOrigin::Existential { .. } => {
1514+
NllRegionVariableOrigin::Existential { .. } => {
15181515
// nothing to check here
15191516
}
15201517
}
@@ -1788,9 +1785,9 @@ impl<'tcx> RegionInferenceContext<'tcx> {
17881785
universe1.cannot_name(placeholder.universe)
17891786
}
17901787

1791-
NllRegionVariableOrigin::RootEmptyRegion
1792-
| NllRegionVariableOrigin::FreeRegion
1793-
| NllRegionVariableOrigin::Existential { .. } => false,
1788+
NllRegionVariableOrigin::FreeRegion | NllRegionVariableOrigin::Existential { .. } => {
1789+
false
1790+
}
17941791
}
17951792
}
17961793

@@ -2152,8 +2149,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
21522149
let blame_source = match from_region_origin {
21532150
NllRegionVariableOrigin::FreeRegion
21542151
| NllRegionVariableOrigin::Existential { from_forall: false } => true,
2155-
NllRegionVariableOrigin::RootEmptyRegion
2156-
| NllRegionVariableOrigin::Placeholder(_)
2152+
NllRegionVariableOrigin::Placeholder(_)
21572153
| NllRegionVariableOrigin::Existential { from_forall: true } => false,
21582154
};
21592155

0 commit comments

Comments
 (0)