about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-09-12 15:02:46 -0400
committerNiko Matsakis <niko@alum.mit.edu>2018-09-26 09:30:54 -0400
commit1fb4ea91f2844b3a2b0efbfd3cefe16bdb946d23 (patch)
tree2bc3bea7b79c9fa9070f689af94c0cc53c46e44d /src
parent80ed62eea77ecac142d241e22c4e048da78d0434 (diff)
downloadrust-1fb4ea91f2844b3a2b0efbfd3cefe16bdb946d23.tar.gz
rust-1fb4ea91f2844b3a2b0efbfd3cefe16bdb946d23.zip
outlives/env: rustfmt
Diffstat (limited to 'src')
-rw-r--r--src/librustc/infer/outlives/env.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/librustc/infer/outlives/env.rs b/src/librustc/infer/outlives/env.rs
index 7f59a6794ef..568e4412fdb 100644
--- a/src/librustc/infer/outlives/env.rs
+++ b/src/librustc/infer/outlives/env.rs
@@ -8,8 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use infer::{GenericKind, InferCtxt};
 use infer::outlives::free_region_map::FreeRegionMap;
+use infer::{GenericKind, InferCtxt};
 use traits::query::outlives_bounds::{self, OutlivesBound};
 use ty::{self, Ty};
 
@@ -167,9 +167,11 @@ impl<'a, 'gcx: 'tcx, 'tcx: 'a> OutlivesEnvironment<'tcx> {
         for outlives_bound in outlives_bounds {
             debug!("add_outlives_bounds: outlives_bound={:?}", outlives_bound);
             match outlives_bound {
-                OutlivesBound::RegionSubRegion(r_a @ &ty::ReEarlyBound(_), &ty::ReVar(vid_b)) |
-                OutlivesBound::RegionSubRegion(r_a @ &ty::ReFree(_), &ty::ReVar(vid_b)) => {
-                    infcx.expect("no infcx provided but region vars found").add_given(r_a, vid_b);
+                OutlivesBound::RegionSubRegion(r_a @ &ty::ReEarlyBound(_), &ty::ReVar(vid_b))
+                | OutlivesBound::RegionSubRegion(r_a @ &ty::ReFree(_), &ty::ReVar(vid_b)) => {
+                    infcx
+                        .expect("no infcx provided but region vars found")
+                        .add_given(r_a, vid_b);
                 }
                 OutlivesBound::RegionSubParam(r_a, param_b) => {
                     self.region_bound_pairs