Skip to content

Commit 1fb4ea9

Browse files
committed
outlives/env: rustfmt
1 parent 80ed62e commit 1fb4ea9

File tree

1 file changed

+6
-4
lines changed
  • src/librustc/infer/outlives

1 file changed

+6
-4
lines changed

src/librustc/infer/outlives/env.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use infer::{GenericKind, InferCtxt};
1211
use infer::outlives::free_region_map::FreeRegionMap;
12+
use infer::{GenericKind, InferCtxt};
1313
use traits::query::outlives_bounds::{self, OutlivesBound};
1414
use ty::{self, Ty};
1515

@@ -167,9 +167,11 @@ impl<'a, 'gcx: 'tcx, 'tcx: 'a> OutlivesEnvironment<'tcx> {
167167
for outlives_bound in outlives_bounds {
168168
debug!("add_outlives_bounds: outlives_bound={:?}", outlives_bound);
169169
match outlives_bound {
170-
OutlivesBound::RegionSubRegion(r_a @ &ty::ReEarlyBound(_), &ty::ReVar(vid_b)) |
171-
OutlivesBound::RegionSubRegion(r_a @ &ty::ReFree(_), &ty::ReVar(vid_b)) => {
172-
infcx.expect("no infcx provided but region vars found").add_given(r_a, vid_b);
170+
OutlivesBound::RegionSubRegion(r_a @ &ty::ReEarlyBound(_), &ty::ReVar(vid_b))
171+
| OutlivesBound::RegionSubRegion(r_a @ &ty::ReFree(_), &ty::ReVar(vid_b)) => {
172+
infcx
173+
.expect("no infcx provided but region vars found")
174+
.add_given(r_a, vid_b);
173175
}
174176
OutlivesBound::RegionSubParam(r_a, param_b) => {
175177
self.region_bound_pairs

0 commit comments

Comments
 (0)