Skip to content

Commit 723ea90

Browse files
committed
rename functions
1 parent 601518e commit 723ea90

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/librustc_mir/borrow_check/diagnostics/region_name.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
337337
let arg_ty = self.regioncx.universal_regions().unnormalized_input_tys
338338
[implicit_inputs + argument_index];
339339
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)
341341
{
342342
return Some(RegionName {
343343
name: self.synthesize_region_name(),
@@ -346,7 +346,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
346346
}
347347

348348
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) {
350350
Some(RegionName {
351351
// This counter value will already have been used, so this function will increment
352352
// it so the next value will be used next and return the region name that would
@@ -359,7 +359,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
359359
}
360360
}
361361

362-
fn give_name_if_we_can_match_hir_ty_from_argument(
362+
fn highlight_if_we_can_match_hir_ty_from_argument(
363363
&self,
364364
needle_fr: RegionVid,
365365
argument_ty: Ty<'tcx>,
@@ -376,7 +376,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
376376
// (`give_name_if_anonymous_region_appears_in_arguments`).
377377
hir::TyKind::Infer => None,
378378

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),
380380
}
381381
}
382382

@@ -391,7 +391,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
391391
/// | | has type `&'1 u32`
392392
/// | has type `&'2 u32`
393393
/// ```
394-
fn give_name_if_we_cannot_match_hir_ty(
394+
fn highlight_if_we_cannot_match_hir_ty(
395395
&self,
396396
needle_fr: RegionVid,
397397
argument_ty: Ty<'tcx>,
@@ -402,7 +402,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
402402
let type_name = self.infcx.extract_type_name(&argument_ty, Some(highlight)).0;
403403

404404
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={:?}",
406406
type_name, needle_fr
407407
);
408408
if type_name.find(&format!("'{}", counter)).is_some() {
@@ -442,7 +442,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
442442
/// keep track of the **closest** type we've found. If we fail to
443443
/// find the exact `&` or `'_` to highlight, then we may fall back
444444
/// 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(
446446
&self,
447447
needle_fr: RegionVid,
448448
argument_ty: Ty<'tcx>,

0 commit comments

Comments
 (0)