about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-11-05 06:34:22 -0500
committerNiko Matsakis <niko@alum.mit.edu>2017-11-16 05:57:43 -0500
commit23abd8513857fdaef35ee48b2df0c69b6f784fcf (patch)
treee9cedf28de2bad1493e557652a1e5ef449a54343 /src
parentcff191d4440df2befeb661f5ce7b9a53a03ce548 (diff)
downloadrust-23abd8513857fdaef35ee48b2df0c69b6f784fcf.tar.gz
rust-23abd8513857fdaef35ee48b2df0c69b6f784fcf.zip
rename `region_inference` module to `region_constraints`
Diffstat (limited to 'src')
-rw-r--r--src/librustc/infer/error_reporting/mod.rs2
-rw-r--r--src/librustc/infer/higher_ranked/mod.rs2
-rw-r--r--src/librustc/infer/lexical_region_resolve/graphviz.rs4
-rw-r--r--src/librustc/infer/lexical_region_resolve/mod.rs8
-rw-r--r--src/librustc/infer/mod.rs10
-rw-r--r--src/librustc/infer/region_constraints/README.md (renamed from src/librustc/infer/region_inference/README.md)0
-rw-r--r--src/librustc/infer/region_constraints/mod.rs (renamed from src/librustc/infer/region_inference/mod.rs)0
-rw-r--r--src/librustc/infer/region_constraints/taint.rs (renamed from src/librustc/infer/region_inference/taint.rs)0
-rw-r--r--src/librustc/middle/region.rs8
-rw-r--r--src/librustc_typeck/check/_match.rs2
-rw-r--r--src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs2
11 files changed, 19 insertions, 19 deletions
diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs
index 9ce0e503280..67fdd68a826 100644
--- a/src/librustc/infer/error_reporting/mod.rs
+++ b/src/librustc/infer/error_reporting/mod.rs
@@ -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;
diff --git a/src/librustc/infer/higher_ranked/mod.rs b/src/librustc/infer/higher_ranked/mod.rs
index e2a214ed0cb..5f898856d31 100644
--- a/src/librustc/infer/higher_ranked/mod.rs
+++ b/src/librustc/infer/higher_ranked/mod.rs
@@ -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;
diff --git a/src/librustc/infer/lexical_region_resolve/graphviz.rs b/src/librustc/infer/lexical_region_resolve/graphviz.rs
index dd775fb5e17..baf7f0aac3d 100644
--- a/src/librustc/infer/lexical_region_resolve/graphviz.rs
+++ b/src/librustc/infer/lexical_region_resolve/graphviz.rs
@@ -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;
diff --git a/src/librustc/infer/lexical_region_resolve/mod.rs b/src/librustc/infer/lexical_region_resolve/mod.rs
index ac3ba57d980..aeeacfb132a 100644
--- a/src/librustc/infer/lexical_region_resolve/mod.rs
+++ b/src/librustc/infer/lexical_region_resolve/mod.rs
@@ -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};
diff --git a/src/librustc/infer/mod.rs b/src/librustc/infer/mod.rs
index 4aef09aa935..e5e6f292f68 100644
--- a/src/librustc/infer/mod.rs
+++ b/src/librustc/infer/mod.rs
@@ -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>,
diff --git a/src/librustc/infer/region_inference/README.md b/src/librustc/infer/region_constraints/README.md
index b564faf3d0c..b564faf3d0c 100644
--- a/src/librustc/infer/region_inference/README.md
+++ b/src/librustc/infer/region_constraints/README.md
diff --git a/src/librustc/infer/region_inference/mod.rs b/src/librustc/infer/region_constraints/mod.rs
index 0731a2cfed6..0731a2cfed6 100644
--- a/src/librustc/infer/region_inference/mod.rs
+++ b/src/librustc/infer/region_constraints/mod.rs
diff --git a/src/librustc/infer/region_inference/taint.rs b/src/librustc/infer/region_constraints/taint.rs
index ee45f7bd828..ee45f7bd828 100644
--- a/src/librustc/infer/region_inference/taint.rs
+++ b/src/librustc/infer/region_constraints/taint.rs
diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs
index a7882992d61..d3aa80e5585 100644
--- a/src/librustc/middle/region.rs
+++ b/src/librustc/middle/region.rs
@@ -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()) {
diff --git a/src/librustc_typeck/check/_match.rs b/src/librustc_typeck/check/_match.rs
index 272f13b2803..ea0fa945c37 100644
--- a/src/librustc_typeck/check/_match.rs
+++ b/src/librustc_typeck/check/_match.rs
@@ -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
diff --git a/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs b/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs
index ae4adbfb1f4..3162ef54f39 100644
--- a/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs
+++ b/src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs
@@ -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()
         }))