Skip to content

Commit

Permalink
Rename NllVisitor as RegionRenumberer.
Browse files Browse the repository at this point in the history
It's a more descriptive name.
  • Loading branch information
nnethercote committed Apr 11, 2023
1 parent 7e8905c commit 7446321
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions compiler/rustc_borrowck/src/renumber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ pub fn renumber_mir<'tcx>(
) {
debug!(?body.arg_count);

let mut visitor = NllVisitor { infcx };
let mut renumberer = RegionRenumberer { infcx };

for body in promoted.iter_mut() {
visitor.visit_body(body);
renumberer.visit_body(body);
}

visitor.visit_body(body);
renumberer.visit_body(body);
}

#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
Expand Down Expand Up @@ -64,11 +64,11 @@ impl RegionCtxt {
}
}

struct NllVisitor<'a, 'tcx> {
struct RegionRenumberer<'a, 'tcx> {
infcx: &'a BorrowckInferCtxt<'a, 'tcx>,
}

impl<'a, 'tcx> NllVisitor<'a, 'tcx> {
impl<'a, 'tcx> RegionRenumberer<'a, 'tcx> {
/// Replaces all regions appearing in `value` with fresh inference
/// variables.
fn renumber_regions<T, F>(&mut self, value: T, region_ctxt_fn: F) -> T
Expand All @@ -83,7 +83,7 @@ impl<'a, 'tcx> NllVisitor<'a, 'tcx> {
}
}

impl<'a, 'tcx> MutVisitor<'tcx> for NllVisitor<'a, 'tcx> {
impl<'a, 'tcx> MutVisitor<'tcx> for RegionRenumberer<'a, 'tcx> {
fn tcx(&self) -> TyCtxt<'tcx> {
self.infcx.tcx
}
Expand Down

0 comments on commit 7446321

Please sign in to comment.