From d8337ee2f4b2de4688019bfa6e2074db85cf5565 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 23 Jun 2022 16:54:55 -0400 Subject: [PATCH] try to clarify confusing comment --- .../rustc_infer/src/infer/outlives/test_type_match.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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) } }