Rename regionmanip to implicator.

This commit is contained in:
Niko Matsakis 2015-02-04 10:33:56 -05:00
parent dfc5c0f1e8
commit df92fe3c96
3 changed files with 12 additions and 12 deletions

View File

@ -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;

View File

@ -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);
}