Skip to content

Commit 6ee423b

Browse files
committed
add assert
1 parent baf4bb7 commit 6ee423b

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_borrowck/src/region_infer

1 file changed

+3
-0
lines changed

compiler/rustc_borrowck/src/region_infer/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,9 @@ impl<'tcx> RegionInferenceContext<'tcx> {
10111011
// For each region outlived by lower_bound find a non-local,
10121012
// universal region (it may be the same region) and add it to
10131013
// `ClosureOutlivesRequirement`.
1014+
let mut found_outlived_universal_region = false;
10141015
for ur in self.scc_values.universal_regions_outlived_by(r_scc) {
1016+
found_outlived_universal_region = true;
10151017
debug!("universal_region_outlived_by ur={:?}", ur);
10161018
let non_local_ub = self.universal_region_relations.non_local_upper_bounds(ur);
10171019
debug!(?non_local_ub);
@@ -1034,6 +1036,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
10341036
propagated_outlives_requirements.push(requirement);
10351037
}
10361038
}
1039+
assert!(found_outlived_universal_region);
10371040
true
10381041
}
10391042

0 commit comments

Comments
 (0)