about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-11-05 13:36:00 +0000
committerMichael Goulet <michael@errs.io>2023-11-06 23:25:32 +0000
commit24e14dd8b40a2434fc2343342c30d8d5748d1c5a (patch)
tree52daaf5286464d9166ddc59b876baf38a0aa36c2 /compiler/rustc_trait_selection/src
parentfb61292105708ea45cf5a4ed596dbbd54c8ed429 (diff)
downloadrust-24e14dd8b40a2434fc2343342c30d8d5748d1c5a.tar.gz
rust-24e14dd8b40a2434fc2343342c30d8d5748d1c5a.zip
Only check predicates for late-bound non-lifetime vars in object candidate assembly
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
index 5c67188dd24..ba551127ce1 100644
--- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
+++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
@@ -628,7 +628,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
         }
 
         self.infcx.probe(|_snapshot| {
-            if obligation.has_non_region_late_bound() {
+            // FIXME(non_lifetime_binders): Really, we care only to check that we don't
+            // have any non-region *escaping* bound vars, but that's hard to check and
+            // we shouldn't really ever encounter those anyways.
+            if obligation.self_ty().has_non_region_late_bound() {
                 return;
             }