@@ -420,9 +420,9 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
420
420
/// | - let's call the lifetime of this reference `'1`
421
421
/// ```
422
422
///
423
- /// the way this works is that we match up `argument_ty `, which is
423
+ /// the way this works is that we match up `ty `, which is
424
424
/// a `Ty<'tcx>` (the internal form of the type) with
425
- /// `argument_hir_ty `, a `hir::Ty` (the syntax of the type
425
+ /// `hir_ty `, a `hir::Ty` (the syntax of the type
426
426
/// annotation). We are descending through the types stepwise,
427
427
/// looking in to find the region `needle_fr` in the internal
428
428
/// type. Once we find that, we can use the span of the `hir::Ty`
@@ -435,15 +435,14 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
435
435
fn highlight_if_we_can_match_hir_ty (
436
436
& self ,
437
437
needle_fr : RegionVid ,
438
- argument_ty : Ty < ' tcx > ,
439
- argument_hir_ty : & hir:: Ty < ' _ > ,
438
+ ty : Ty < ' tcx > ,
439
+ hir_ty : & hir:: Ty < ' _ > ,
440
440
) -> Option < RegionNameHighlight > {
441
- let search_stack: & mut Vec < ( Ty < ' tcx > , & hir:: Ty < ' _ > ) > =
442
- & mut vec ! [ ( argument_ty, argument_hir_ty) ] ;
441
+ let search_stack: & mut Vec < ( Ty < ' tcx > , & hir:: Ty < ' _ > ) > = & mut vec ! [ ( ty, hir_ty) ] ;
443
442
444
443
while let Some ( ( ty, hir_ty) ) = search_stack. pop ( ) {
445
444
match ( & ty. kind , & hir_ty. kind ) {
446
- // Check if the `argument_ty ` is `&'X ..` where `'X`
445
+ // Check if the `ty ` is `&'X ..` where `'X`
447
446
// is the region we are looking for -- if so, and we have a `&T`
448
447
// on the RHS, then we want to highlight the `&` like so:
449
448
//
0 commit comments