Skip to content

Commit b7f8713

Browse files
committed
region_infer: rustfmt
1 parent 8eb789f commit b7f8713

File tree

1 file changed

+11
-17
lines changed
  • src/librustc_mir/borrow_check/nll/region_infer

1 file changed

+11
-17
lines changed

src/librustc_mir/borrow_check/nll/region_infer/mod.rs

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
686686
test: _,
687687
} = type_test;
688688

689-
690689
let generic_ty = generic_kind.to_ty(tcx);
691690
let subject = match self.try_promote_type_test_subject(infcx, generic_ty) {
692691
Some(s) => s,
@@ -704,11 +703,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
704703
debug!("try_promote_type_test: non_local_ub={:?}", non_local_ub);
705704

706705
assert!(self.universal_regions.is_universal_region(non_local_ub));
707-
assert!(
708-
!self
709-
.universal_regions
710-
.is_local_free_region(non_local_ub)
711-
);
706+
assert!(!self.universal_regions.is_local_free_region(non_local_ub));
712707

713708
let requirement = ClosureOutlivesRequirement {
714709
subject,
@@ -922,8 +917,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
922917
// now). Therefore, the sup-region outlives the sub-region if,
923918
// for each universal region R1 in the sub-region, there
924919
// exists some region R2 in the sup-region that outlives R1.
925-
let universal_outlives = self
926-
.scc_values
920+
let universal_outlives = self.scc_values
927921
.universal_regions_outlived_by(sub_region_scc)
928922
.all(|r1| {
929923
self.scc_values
@@ -1034,8 +1028,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
10341028
// (because `fr` includes `end(o)`).
10351029
for shorter_fr in self.scc_values.universal_regions_outlived_by(longer_fr_scc) {
10361030
// If it is known that `fr: o`, carry on.
1037-
if self
1038-
.universal_region_relations
1031+
if self.universal_region_relations
10391032
.outlives(longer_fr, shorter_fr)
10401033
{
10411034
continue;
@@ -1051,8 +1044,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
10511044
if let Some(propagated_outlives_requirements) = propagated_outlives_requirements {
10521045
// Shrink `fr` until we find a non-local region (if we do).
10531046
// We'll call that `fr-` -- it's ever so slightly smaller than `fr`.
1054-
if let Some(fr_minus) = self
1055-
.universal_region_relations
1047+
if let Some(fr_minus) = self.universal_region_relations
10561048
.non_local_lower_bound(longer_fr)
10571049
{
10581050
debug!("check_universal_region: fr_minus={:?}", fr_minus);
@@ -1061,8 +1053,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
10611053
// region. (We always will.) We'll call that
10621054
// `shorter_fr+` -- it's ever so slightly larger than
10631055
// `fr`.
1064-
let shorter_fr_plus = self
1065-
.universal_region_relations
1056+
let shorter_fr_plus = self.universal_region_relations
10661057
.non_local_upper_bound(shorter_fr);
10671058
debug!(
10681059
"check_universal_region: shorter_fr_plus={:?}",
@@ -1122,8 +1113,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
11221113
let error_region = match error_element {
11231114
RegionElement::Location(l) => self.find_sub_region_live_at(longer_fr, l),
11241115
RegionElement::RootUniversalRegion(r) => r,
1125-
RegionElement::SubUniversalRegion(error_ui) => self
1126-
.definitions
1116+
RegionElement::SubUniversalRegion(error_ui) => self.definitions
11271117
.iter_enumerated()
11281118
.filter_map(|(r, definition)| match definition.origin {
11291119
NLLRegionVariableOrigin::BoundRegion(ui) if error_ui == ui => Some(r),
@@ -1220,7 +1210,11 @@ impl<'gcx, 'tcx> ClosureRegionRequirementsExt<'gcx, 'tcx> for ClosureRegionRequi
12201210
// into a vector. These are the regions that we will be
12211211
// relating to one another.
12221212
let closure_mapping = &UniversalRegions::closure_mapping(
1223-
tcx, user_closure_ty, self.num_external_vids, tcx.closure_base_def_id(closure_def_id));
1213+
tcx,
1214+
user_closure_ty,
1215+
self.num_external_vids,
1216+
tcx.closure_base_def_id(closure_def_id),
1217+
);
12241218
debug!("apply_requirements: closure_mapping={:?}", closure_mapping);
12251219

12261220
// Create the predicates.

0 commit comments

Comments
 (0)