Skip to content

Commit 8cf1a44

Browse files
committed
Rename UniversalRegionRelationsBuilder.
Rename it as `CreateResultBuilder`, because it builds a `CreateResult`. (`CreateResult` contains a `UniversalRegionRelations`, so maybe the name made more sense in the past.) Also rename the `create` method as `build`, to match the `Builder` in the name.
1 parent 36f5324 commit 8cf1a44

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/rustc_borrowck/src/type_check/free_region_relations.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub(crate) fn create<'tcx>(
5757
universal_regions: Rc<UniversalRegions<'tcx>>,
5858
constraints: &mut MirTypeckRegionConstraints<'tcx>,
5959
) -> CreateResult<'tcx> {
60-
UniversalRegionRelationsBuilder {
60+
CreateResultBuilder {
6161
infcx,
6262
param_env,
6363
implicit_region_bound,
@@ -67,7 +67,7 @@ pub(crate) fn create<'tcx>(
6767
outlives: Default::default(),
6868
inverse_outlives: Default::default(),
6969
}
70-
.create()
70+
.build()
7171
}
7272

7373
impl UniversalRegionRelations<'_> {
@@ -181,7 +181,7 @@ impl UniversalRegionRelations<'_> {
181181
}
182182
}
183183

184-
struct UniversalRegionRelationsBuilder<'a, 'tcx> {
184+
struct CreateResultBuilder<'a, 'tcx> {
185185
infcx: &'a InferCtxt<'tcx>,
186186
param_env: ty::ParamEnv<'tcx>,
187187
universal_regions: Rc<UniversalRegions<'tcx>>,
@@ -194,7 +194,7 @@ struct UniversalRegionRelationsBuilder<'a, 'tcx> {
194194
region_bound_pairs: RegionBoundPairs<'tcx>,
195195
}
196196

197-
impl<'tcx> UniversalRegionRelationsBuilder<'_, 'tcx> {
197+
impl<'tcx> CreateResultBuilder<'_, 'tcx> {
198198
/// Records in the `outlives_relation` (and
199199
/// `inverse_outlives_relation`) that `fr_a: fr_b`.
200200
fn relate_universal_regions(&mut self, fr_a: RegionVid, fr_b: RegionVid) {
@@ -204,7 +204,7 @@ impl<'tcx> UniversalRegionRelationsBuilder<'_, 'tcx> {
204204
}
205205

206206
#[instrument(level = "debug", skip(self))]
207-
pub(crate) fn create(mut self) -> CreateResult<'tcx> {
207+
pub(crate) fn build(mut self) -> CreateResult<'tcx> {
208208
let tcx = self.infcx.tcx;
209209
let defining_ty_def_id = self.universal_regions.defining_ty.def_id().expect_local();
210210
let span = tcx.def_span(defining_ty_def_id);

0 commit comments

Comments
 (0)