about summary refs log tree commit diff
path: root/src/librustc_mir
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2019-10-20 22:08:44 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2019-10-24 21:15:08 +0100
commitd72417434682e1fcb6e447436f0664d7ea763468 (patch)
tree1025f71ba35a49e55e303643b48e8c265ca3e8c9 /src/librustc_mir
parent89e645ace853d86e8c0002247482eac9073c90fd (diff)
downloadrust-d72417434682e1fcb6e447436f0664d7ea763468.tar.gz
rust-d72417434682e1fcb6e447436f0664d7ea763468.zip
Fix more `ReEmpty` ICEs
Diffstat (limited to 'src/librustc_mir')
-rw-r--r--src/librustc_mir/borrow_check/nll/type_check/constraint_conversion.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_mir/borrow_check/nll/type_check/constraint_conversion.rs b/src/librustc_mir/borrow_check/nll/type_check/constraint_conversion.rs
index c88f1cac350..34ac96beb5c 100644
--- a/src/librustc_mir/borrow_check/nll/type_check/constraint_conversion.rs
+++ b/src/librustc_mir/borrow_check/nll/type_check/constraint_conversion.rs
@@ -178,6 +178,9 @@ impl<'a, 'b, 'tcx> TypeOutlivesDelegate<'tcx> for &'a mut ConstraintConversion<'
         a: ty::Region<'tcx>,
         b: ty::Region<'tcx>,
     ) {
+        if let ty::ReEmpty = a {
+            return;
+        }
         let b = self.to_region_vid(b);
         let a = self.to_region_vid(a);
         self.add_outlives(b, a);
@@ -190,6 +193,9 @@ impl<'a, 'b, 'tcx> TypeOutlivesDelegate<'tcx> for &'a mut ConstraintConversion<'
         a: ty::Region<'tcx>,
         bound: VerifyBound<'tcx>,
     ) {
+        if let ty::ReEmpty = a {
+            return;
+        }
         let type_test = self.verify_to_type_test(kind, a, bound);
         self.add_type_test(type_test);
     }