diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2019-10-20 22:08:44 +0100 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2019-10-24 21:15:08 +0100 |
| commit | d72417434682e1fcb6e447436f0664d7ea763468 (patch) | |
| tree | 1025f71ba35a49e55e303643b48e8c265ca3e8c9 /src/librustc_mir | |
| parent | 89e645ace853d86e8c0002247482eac9073c90fd (diff) | |
| download | rust-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.rs | 6 |
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); } |
