@@ -578,18 +578,18 @@ pub fn collect_trait_impl_trait_tys<'tcx>(
578
578
// region substs that are synthesized during AST lowering. These are substs
579
579
// that are appended to the parent substs (trait and trait method). However,
580
580
// we're trying to infer the unsubstituted type value of the RPITIT inside
581
- // the *impl*, so we can later use the impl's method substitutions to normalize
582
- // an RPITIT to a concrete type.
581
+ // the *impl*, so we can later use the impl's method substs to normalize
582
+ // an RPITIT to a concrete type (`confirm_impl_trait_in_trait_candidate`) .
583
583
//
584
584
// Due to the design of RPITITs, during AST lowering, we have no idea that
585
- // an impl method is satisfying a trait method with RPITITs in it. Therefore,
586
- // we don't have a list ofearly -bound region substs for the RPITIT in the impl.
585
+ // an impl method corresponds to a trait method with RPITITs in it. Therefore,
586
+ // we don't have a list of early -bound region substs for the RPITIT in the impl.
587
587
// Since early region parameters are index-based, we can't just rebase these
588
- // (trait method) early-bound region substs onto the impl, since region
589
- // parameters are index-based, and there's no guarantee that the indices from
590
- // the trait substs and impl substs line up -- so we subtract the number of
591
- // trait substs and add the number of impl substs to *renumber* these early-
592
- // bound regions to their corresponding indices in the impl's substitutions list.
588
+ // (trait method) early-bound region substs onto the impl, and there's no
589
+ // guarantee that the indices from the trait substs and impl substs line up.
590
+ // So to fix this, we subtract the number of trait substs and add the number of
591
+ // impl substs to *renumber* these early-bound regions to their corresponding
592
+ // indices in the impl's substitutions list.
593
593
//
594
594
// Also, we only need to account for a difference in trait and impl substs,
595
595
// since we previously enforce that the trait method and impl method have the
0 commit comments