From df92fe3c964492a22a2c81896b951ef649438e3b Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 4 Feb 2015 10:33:56 -0500 Subject: [PATCH] Rename regionmanip to implicator. --- .../check/{regionmanip.rs => implicator.rs} | 0 src/librustc_typeck/check/mod.rs | 2 +- src/librustc_typeck/check/regionck.rs | 22 +++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) rename src/librustc_typeck/check/{regionmanip.rs => implicator.rs} (100%) diff --git a/src/librustc_typeck/check/regionmanip.rs b/src/librustc_typeck/check/implicator.rs similarity index 100% rename from src/librustc_typeck/check/regionmanip.rs rename to src/librustc_typeck/check/implicator.rs diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 30896c1607a..4c91db5a62c 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -131,7 +131,7 @@ pub mod dropck; pub mod _match; pub mod vtable; pub mod writeback; -pub mod regionmanip; +pub mod implicator; pub mod regionck; pub mod coercion; pub mod demand; diff --git a/src/librustc_typeck/check/regionck.rs b/src/librustc_typeck/check/regionck.rs index 17c259e674e..6b506337508 100644 --- a/src/librustc_typeck/check/regionck.rs +++ b/src/librustc_typeck/check/regionck.rs @@ -85,7 +85,7 @@ use astconv::AstConv; use check::dropck; use check::FnCtxt; -use check::regionmanip; +use check::implicator; use check::vtable; use middle::def; use middle::mem_categorization as mc; @@ -336,24 +336,24 @@ impl<'a, 'tcx> Rcx<'a, 'tcx> { let body_scope = CodeExtent::from_node_id(body_id); let body_scope = ty::ReScope(body_scope); let constraints = - regionmanip::region_wf_constraints( + implicator::region_wf_constraints( tcx, ty, body_scope); for constraint in &constraints { debug!("constraint: {}", constraint.repr(tcx)); match *constraint { - regionmanip::RegionSubRegionConstraint(_, + implicator::RegionSubRegionConstraint(_, ty::ReFree(free_a), ty::ReFree(free_b)) => { tcx.region_maps.relate_free_regions(free_a, free_b); } - regionmanip::RegionSubRegionConstraint(_, + implicator::RegionSubRegionConstraint(_, ty::ReFree(free_a), ty::ReInfer(ty::ReVar(vid_b))) => { self.fcx.inh.infcx.add_given(free_a, vid_b); } - regionmanip::RegionSubRegionConstraint(..) => { + implicator::RegionSubRegionConstraint(..) => { // In principle, we could record (and take // advantage of) every relationship here, but // we are also free not to -- it simply means @@ -364,7 +364,7 @@ impl<'a, 'tcx> Rcx<'a, 'tcx> { // relationship that arises here, but // presently we do not.) } - regionmanip::RegionSubGenericConstraint(_, r_a, ref generic_b) => { + implicator::RegionSubGenericConstraint(_, r_a, ref generic_b) => { debug!("RegionSubGenericConstraint: {} <= {}", r_a.repr(tcx), generic_b.repr(tcx)); @@ -1482,24 +1482,24 @@ pub fn type_must_outlive<'a, 'tcx>(rcx: &mut Rcx<'a, 'tcx>, region.repr(rcx.tcx())); let constraints = - regionmanip::region_wf_constraints( + implicator::region_wf_constraints( rcx.tcx(), ty, region); for constraint in &constraints { debug!("constraint: {}", constraint.repr(rcx.tcx())); match *constraint { - regionmanip::RegionSubRegionConstraint(None, r_a, r_b) => { + implicator::RegionSubRegionConstraint(None, r_a, r_b) => { rcx.fcx.mk_subr(origin.clone(), r_a, r_b); } - regionmanip::RegionSubRegionConstraint(Some(ty), r_a, r_b) => { + implicator::RegionSubRegionConstraint(Some(ty), r_a, r_b) => { let o1 = infer::ReferenceOutlivesReferent(ty, origin.span()); rcx.fcx.mk_subr(o1, r_a, r_b); } - regionmanip::RegionSubGenericConstraint(None, r_a, ref generic_b) => { + implicator::RegionSubGenericConstraint(None, r_a, ref generic_b) => { generic_must_outlive(rcx, origin.clone(), r_a, generic_b); } - regionmanip::RegionSubGenericConstraint(Some(ty), r_a, ref generic_b) => { + implicator::RegionSubGenericConstraint(Some(ty), r_a, ref generic_b) => { let o1 = infer::ReferenceOutlivesReferent(ty, origin.span()); generic_must_outlive(rcx, o1, r_a, generic_b); }