@@ -337,7 +337,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
337
337
let arg_ty = self . regioncx . universal_regions ( ) . unnormalized_input_tys
338
338
[ implicit_inputs + argument_index] ;
339
339
if let Some ( highlight) =
340
- self . give_name_if_we_can_match_hir_ty_from_argument ( fr, arg_ty, argument_index)
340
+ self . highlight_if_we_can_match_hir_ty_from_argument ( fr, arg_ty, argument_index)
341
341
{
342
342
return Some ( RegionName {
343
343
name : self . synthesize_region_name ( ) ,
@@ -346,7 +346,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
346
346
}
347
347
348
348
let counter = * self . next_region_name . try_borrow ( ) . unwrap ( ) ;
349
- if let Some ( highlight) = self . give_name_if_we_cannot_match_hir_ty ( fr, arg_ty, counter) {
349
+ if let Some ( highlight) = self . highlight_if_we_cannot_match_hir_ty ( fr, arg_ty, counter) {
350
350
Some ( RegionName {
351
351
// This counter value will already have been used, so this function will increment
352
352
// it so the next value will be used next and return the region name that would
@@ -359,7 +359,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
359
359
}
360
360
}
361
361
362
- fn give_name_if_we_can_match_hir_ty_from_argument (
362
+ fn highlight_if_we_can_match_hir_ty_from_argument (
363
363
& self ,
364
364
needle_fr : RegionVid ,
365
365
argument_ty : Ty < ' tcx > ,
@@ -376,7 +376,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
376
376
// (`give_name_if_anonymous_region_appears_in_arguments`).
377
377
hir:: TyKind :: Infer => None ,
378
378
379
- _ => self . give_name_if_we_can_match_hir_ty ( needle_fr, argument_ty, argument_hir_ty) ,
379
+ _ => self . highlight_if_we_can_match_hir_ty ( needle_fr, argument_ty, argument_hir_ty) ,
380
380
}
381
381
}
382
382
@@ -391,7 +391,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
391
391
/// | | has type `&'1 u32`
392
392
/// | has type `&'2 u32`
393
393
/// ```
394
- fn give_name_if_we_cannot_match_hir_ty (
394
+ fn highlight_if_we_cannot_match_hir_ty (
395
395
& self ,
396
396
needle_fr : RegionVid ,
397
397
argument_ty : Ty < ' tcx > ,
@@ -402,7 +402,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
402
402
let type_name = self . infcx . extract_type_name ( & argument_ty, Some ( highlight) ) . 0 ;
403
403
404
404
debug ! (
405
- "give_name_if_we_cannot_match_hir_ty : type_name={:?} needle_fr={:?}" ,
405
+ "highlight_if_we_cannot_match_hir_ty : type_name={:?} needle_fr={:?}" ,
406
406
type_name, needle_fr
407
407
) ;
408
408
if type_name. find ( & format ! ( "'{}" , counter) ) . is_some ( ) {
@@ -442,7 +442,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
442
442
/// keep track of the **closest** type we've found. If we fail to
443
443
/// find the exact `&` or `'_` to highlight, then we may fall back
444
444
/// to highlighting that closest type instead.
445
- fn give_name_if_we_can_match_hir_ty (
445
+ fn highlight_if_we_can_match_hir_ty (
446
446
& self ,
447
447
needle_fr : RegionVid ,
448
448
argument_ty : Ty < ' tcx > ,
0 commit comments