diff --git a/compiler/rustc_infer/src/infer/outlives/test_type_match.rs b/compiler/rustc_infer/src/infer/outlives/test_type_match.rs index 99fd41976a3..645c2df341b 100644 --- a/compiler/rustc_infer/src/infer/outlives/test_type_match.rs +++ b/compiler/rustc_infer/src/infer/outlives/test_type_match.rs @@ -57,7 +57,15 @@ pub fn extract_verify_if_eq<'tcx>( } } } else { - // The region does not contain any inference variables. + // The region does not contain any bound variables, so we don't need + // to do any substitution. + // + // Example: + // + // for<'a> >::Item: 'b + // + // In this case, we've now matched and found a value for + // `'a`, but it doesn't affect the bound `'b`. Some(verify_if_eq.bound) } }