about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_trait_selection/src/traits/outlives_bounds.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs b/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs
index 64be4a55708..5b8d9e7f0f7 100644
--- a/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs
+++ b/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs
@@ -56,11 +56,12 @@ impl<'a, 'tcx: 'a> InferCtxtExt<'a, 'tcx> for InferCtxt<'tcx> {
         let ty = self.resolve_vars_if_possible(ty);
         let ty = OpportunisticRegionResolver::new(self).fold_ty(ty);
 
-        // We must avoid processing constrained lifetime variables in implied
+        // We must avoid processing unconstrained lifetime variables in implied
         // bounds. See #110161 for context.
+        assert!(!ty.has_non_region_infer());
         if ty.needs_infer() {
             self.tcx.sess.delay_span_bug(
-                self.tcx.source_span_untracked(body_id),
+                self.tcx.def_span(body_id),
                 "skipped implied_outlives_bounds due to unconstrained lifetimes",
             );
             return vec![];