rename region_inference module to region_constraints

This commit is contained in:
Niko Matsakis 2017-11-05 06:34:22 -05:00
parent cff191d444
commit 23abd85138
11 changed files with 19 additions and 19 deletions

View file

@ -57,7 +57,7 @@
use infer;
use super::{InferCtxt, TypeTrace, SubregionOrigin, RegionVariableOrigin, ValuePairs};
use super::region_inference::GenericKind;
use super::region_constraints::GenericKind;
use super::lexical_region_resolve::RegionResolutionError;
use std::fmt;

View file

@ -17,7 +17,7 @@ use super::{CombinedSnapshot,
SubregionOrigin,
SkolemizationMap};
use super::combine::CombineFields;
use super::region_inference::{TaintDirections};
use super::region_constraints::{TaintDirections};
use ty::{self, TyCtxt, Binder, TypeFoldable};
use ty::error::TypeError;

View file

@ -9,7 +9,7 @@
// except according to those terms.
//! This module provides linkage between libgraphviz traits and
//! `rustc::middle::typeck::infer::region_inference`, generating a
//! `rustc::middle::typeck::infer::region_constraints`, generating a
//! rendering of the graph represented by the list of `Constraint`
//! instances (which make up the edges of the graph), as well as the
//! origin for each constraint (which are attached to the labels on
@ -25,7 +25,7 @@ use middle::free_region::RegionRelations;
use middle::region;
use super::Constraint;
use infer::SubregionOrigin;
use infer::region_inference::RegionVarBindings;
use infer::region_constraints::RegionVarBindings;
use util::nodemap::{FxHashMap, FxHashSet};
use std::borrow::Cow;

View file

@ -12,10 +12,10 @@
use infer::SubregionOrigin;
use infer::RegionVariableOrigin;
use infer::region_inference::Constraint;
use infer::region_inference::GenericKind;
use infer::region_inference::RegionVarBindings;
use infer::region_inference::VerifyBound;
use infer::region_constraints::Constraint;
use infer::region_constraints::GenericKind;
use infer::region_constraints::RegionVarBindings;
use infer::region_constraints::VerifyBound;
use middle::free_region::RegionRelations;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::graph::{self, Direction, NodeIndex, OUTGOING};

View file

@ -16,7 +16,7 @@ pub use self::SubregionOrigin::*;
pub use self::ValuePairs::*;
pub use ty::IntVarValue;
pub use self::freshen::TypeFreshener;
pub use self::region_inference::{GenericKind, VerifyBound};
pub use self::region_constraints::{GenericKind, VerifyBound};
use hir::def_id::DefId;
use middle::free_region::{FreeRegionMap, RegionRelations};
@ -41,7 +41,7 @@ use arena::DroplessArena;
use self::combine::CombineFields;
use self::higher_ranked::HrMatchResult;
use self::region_inference::{RegionVarBindings, RegionSnapshot};
use self::region_constraints::{RegionVarBindings, RegionSnapshot};
use self::lexical_region_resolve::LexicalRegionResolutions;
use self::type_variable::TypeVariableOrigin;
use self::unify_key::ToType;
@ -55,7 +55,7 @@ mod glb;
mod higher_ranked;
pub mod lattice;
mod lub;
pub mod region_inference;
pub mod region_constraints;
mod lexical_region_resolve;
mod outlives;
pub mod resolve;
@ -104,7 +104,7 @@ pub struct InferCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
float_unification_table: RefCell<UnificationTable<ty::FloatVid>>,
// For region variables.
region_vars: RefCell<RegionVarBindings<'tcx>>,
region_constraints: RefCell<RegionConstraints<'tcx>>,
// Once region inference is done, the values for each variable.
lexical_region_resolutions: RefCell<Option<LexicalRegionResolutions<'tcx>>>,
@ -1354,7 +1354,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
Ok(InferOk { value: result, obligations: combine.obligations })
}
/// See `verify_generic_bound` method in `region_inference`
/// See `verify_generic_bound` method in `region_constraints`
pub fn verify_generic_bound(&self,
origin: SubregionOrigin<'tcx>,
kind: GenericKind<'tcx>,

View file

@ -12,7 +12,7 @@
//! the parent links in the region hierarchy.
//!
//! Most of the documentation on regions can be found in
//! `middle/infer/region_inference/README.md`
//! `middle/infer/region_constraints/README.md`
use ich::{StableHashingContext, NodeIdHashingMode};
use util::nodemap::{FxHashMap, FxHashSet};
@ -320,7 +320,7 @@ pub struct ScopeTree {
/// hierarchy based on their lexical mapping. This is used to
/// handle the relationships between regions in a fn and in a
/// closure defined by that fn. See the "Modeling closures"
/// section of the README in infer::region_inference for
/// section of the README in infer::region_constraints for
/// more details.
closure_tree: FxHashMap<hir::ItemLocalId, hir::ItemLocalId>,
@ -407,7 +407,7 @@ pub struct Context {
/// of the innermost fn body. Each fn forms its own disjoint tree
/// in the region hierarchy. These fn bodies are themselves
/// arranged into a tree. See the "Modeling closures" section of
/// the README in infer::region_inference for more
/// the README in infer::region_constraints for more
/// details.
root_id: Option<hir::ItemLocalId>,
@ -646,7 +646,7 @@ impl<'tcx> ScopeTree {
// different functions. Compare those fn for lexical
// nesting. The reasoning behind this is subtle. See the
// "Modeling closures" section of the README in
// infer::region_inference for more details.
// infer::region_constraints for more details.
let a_root_scope = a_ancestors[a_index];
let b_root_scope = a_ancestors[a_index];
return match (a_root_scope.data(), b_root_scope.data()) {

View file

@ -471,7 +471,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
//
// 2. Things go horribly wrong if we use subtype. The reason for
// THIS is a fairly subtle case involving bound regions. See the
// `givens` field in `region_inference`, as well as the test
// `givens` field in `region_constraints`, as well as the test
// `regions-relate-bound-regions-on-closures-to-inference-variables.rs`,
// for details. Short version is that we must sometimes detect
// relationships between specific region variables and regions

View file

@ -42,7 +42,7 @@ impl<'a,'tcx> Foo<'a,'tcx> {
// inferring `'_2` to be `'static` in this case, because
// it is created outside the closure but then related to
// regions bound by the closure itself. See the
// `region_inference.rs` file (and the `givens` field, in
// `region_constraints.rs` file (and the `givens` field, in
// particular) for more details.
this.foo()
}))