about summary refs log tree commit diff
path: root/compiler/rustc_borrowck
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2022-06-14 20:18:46 -0400
committerNiko Matsakis <niko@alum.mit.edu>2022-06-15 11:47:04 -0400
commitd203c13db23fe0f0d39b448e6926beaad9b550a4 (patch)
tree6f16c6c5a2b67c07f74da776325534a528b945a7 /compiler/rustc_borrowck
parent1f34da9ec8a85b6f86c5fa1c121ab6f88f2f4966 (diff)
downloadrust-d203c13db23fe0f0d39b448e6926beaad9b550a4.tar.gz
rust-d203c13db23fe0f0d39b448e6926beaad9b550a4.zip
simply the IfEq bound -- we only ever use a region
the excessive generality becomes annoying later because
it wouldn't implement type folding etc
Diffstat (limited to 'compiler/rustc_borrowck')
-rw-r--r--compiler/rustc_borrowck/src/region_infer/mod.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/compiler/rustc_borrowck/src/region_infer/mod.rs b/compiler/rustc_borrowck/src/region_infer/mod.rs
index 2c460bcb72d..228e88b33cf 100644
--- a/compiler/rustc_borrowck/src/region_infer/mod.rs
+++ b/compiler/rustc_borrowck/src/region_infer/mod.rs
@@ -1170,9 +1170,14 @@ impl<'tcx> RegionInferenceContext<'tcx> {
         debug!("eval_verify_bound(lower_bound={:?}, verify_bound={:?})", lower_bound, verify_bound);
 
         match verify_bound {
-            VerifyBound::IfEq(test_ty, verify_bound1) => {
-                self.eval_if_eq(tcx, body, generic_ty, lower_bound, *test_ty, verify_bound1)
-            }
+            VerifyBound::IfEq(test_ty, verify_bound1) => self.eval_if_eq(
+                tcx,
+                body,
+                generic_ty,
+                lower_bound,
+                *test_ty,
+                &VerifyBound::OutlivedBy(*verify_bound1),
+            ),
 
             VerifyBound::IsEmpty => {
                 let lower_bound_scc = self.constraint_sccs.scc(lower_bound);