Rename NllVisitor
as RegionRenumberer
.
It's a more descriptive name.
This commit is contained in:
parent
7e8905cd18
commit
74463214a6
1 changed files with 6 additions and 6 deletions
|
@ -20,13 +20,13 @@ pub fn renumber_mir<'tcx>(
|
||||||
) {
|
) {
|
||||||
debug!(?body.arg_count);
|
debug!(?body.arg_count);
|
||||||
|
|
||||||
let mut visitor = NllVisitor { infcx };
|
let mut renumberer = RegionRenumberer { infcx };
|
||||||
|
|
||||||
for body in promoted.iter_mut() {
|
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)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
||||||
|
@ -64,11 +64,11 @@ impl RegionCtxt {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct NllVisitor<'a, 'tcx> {
|
struct RegionRenumberer<'a, 'tcx> {
|
||||||
infcx: &'a BorrowckInferCtxt<'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
|
/// Replaces all regions appearing in `value` with fresh inference
|
||||||
/// variables.
|
/// variables.
|
||||||
fn renumber_regions<T, F>(&mut self, value: T, region_ctxt_fn: F) -> T
|
fn renumber_regions<T, F>(&mut self, value: T, region_ctxt_fn: F) -> T
|
||||||
|
@ -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> {
|
fn tcx(&self) -> TyCtxt<'tcx> {
|
||||||
self.infcx.tcx
|
self.infcx.tcx
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue