Skip to content

Commit f5fbef3

Browse files
committed
rename region_inference module to region_constraints
1 parent 3e12f5f commit f5fbef3

File tree

11 files changed

+19
-19
lines changed

11 files changed

+19
-19
lines changed

src/librustc/infer/error_reporting/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
5858
use infer;
5959
use super::{InferCtxt, TypeTrace, SubregionOrigin, RegionVariableOrigin, ValuePairs};
60-
use super::region_inference::GenericKind;
60+
use super::region_constraints::GenericKind;
6161
use super::lexical_region_resolve::RegionResolutionError;
6262

6363
use std::fmt;

src/librustc/infer/higher_ranked/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use super::{CombinedSnapshot,
1717
SubregionOrigin,
1818
SkolemizationMap};
1919
use super::combine::CombineFields;
20-
use super::region_inference::{TaintDirections};
20+
use super::region_constraints::{TaintDirections};
2121

2222
use ty::{self, TyCtxt, Binder, TypeFoldable};
2323
use ty::error::TypeError;

src/librustc/infer/lexical_region_resolve/graphviz.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
//! This module provides linkage between libgraphviz traits and
12-
//! `rustc::middle::typeck::infer::region_inference`, generating a
12+
//! `rustc::middle::typeck::infer::region_constraints`, generating a
1313
//! rendering of the graph represented by the list of `Constraint`
1414
//! instances (which make up the edges of the graph), as well as the
1515
//! origin for each constraint (which are attached to the labels on
@@ -25,7 +25,7 @@ use middle::free_region::RegionRelations;
2525
use middle::region;
2626
use super::Constraint;
2727
use infer::SubregionOrigin;
28-
use infer::region_inference::RegionVarBindings;
28+
use infer::region_constraints::RegionVarBindings;
2929
use util::nodemap::{FxHashMap, FxHashSet};
3030

3131
use std::borrow::Cow;

src/librustc/infer/lexical_region_resolve/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
1313
use infer::SubregionOrigin;
1414
use infer::RegionVariableOrigin;
15-
use infer::region_inference::Constraint;
16-
use infer::region_inference::GenericKind;
17-
use infer::region_inference::RegionVarBindings;
18-
use infer::region_inference::VerifyBound;
15+
use infer::region_constraints::Constraint;
16+
use infer::region_constraints::GenericKind;
17+
use infer::region_constraints::RegionVarBindings;
18+
use infer::region_constraints::VerifyBound;
1919
use middle::free_region::RegionRelations;
2020
use rustc_data_structures::fx::FxHashSet;
2121
use rustc_data_structures::graph::{self, Direction, NodeIndex, OUTGOING};

src/librustc/infer/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub use self::SubregionOrigin::*;
1616
pub use self::ValuePairs::*;
1717
pub use ty::IntVarValue;
1818
pub use self::freshen::TypeFreshener;
19-
pub use self::region_inference::{GenericKind, VerifyBound};
19+
pub use self::region_constraints::{GenericKind, VerifyBound};
2020

2121
use hir::def_id::DefId;
2222
use middle::free_region::{FreeRegionMap, RegionRelations};
@@ -41,7 +41,7 @@ use arena::DroplessArena;
4141

4242
use self::combine::CombineFields;
4343
use self::higher_ranked::HrMatchResult;
44-
use self::region_inference::{RegionVarBindings, RegionSnapshot};
44+
use self::region_constraints::{RegionVarBindings, RegionSnapshot};
4545
use self::lexical_region_resolve::LexicalRegionResolutions;
4646
use self::type_variable::TypeVariableOrigin;
4747
use self::unify_key::ToType;
@@ -55,7 +55,7 @@ mod glb;
5555
mod higher_ranked;
5656
pub mod lattice;
5757
mod lub;
58-
pub mod region_inference;
58+
pub mod region_constraints;
5959
mod lexical_region_resolve;
6060
mod outlives;
6161
pub mod resolve;
@@ -104,7 +104,7 @@ pub struct InferCtxt<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
104104
float_unification_table: RefCell<UnificationTable<ty::FloatVid>>,
105105

106106
// For region variables.
107-
region_vars: RefCell<RegionVarBindings<'tcx>>,
107+
region_constraints: RefCell<RegionConstraints<'tcx>>,
108108

109109
// Once region inference is done, the values for each variable.
110110
lexical_region_resolutions: RefCell<Option<LexicalRegionResolutions<'tcx>>>,
@@ -1354,7 +1354,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
13541354
Ok(InferOk { value: result, obligations: combine.obligations })
13551355
}
13561356

1357-
/// See `verify_generic_bound` method in `region_inference`
1357+
/// See `verify_generic_bound` method in `region_constraints`
13581358
pub fn verify_generic_bound(&self,
13591359
origin: SubregionOrigin<'tcx>,
13601360
kind: GenericKind<'tcx>,

src/librustc/middle/region.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//! the parent links in the region hierarchy.
1313
//!
1414
//! Most of the documentation on regions can be found in
15-
//! `middle/infer/region_inference/README.md`
15+
//! `middle/infer/region_constraints/README.md`
1616
1717
use ich::{StableHashingContext, NodeIdHashingMode};
1818
use util::nodemap::{FxHashMap, FxHashSet};
@@ -320,7 +320,7 @@ pub struct ScopeTree {
320320
/// hierarchy based on their lexical mapping. This is used to
321321
/// handle the relationships between regions in a fn and in a
322322
/// closure defined by that fn. See the "Modeling closures"
323-
/// section of the README in infer::region_inference for
323+
/// section of the README in infer::region_constraints for
324324
/// more details.
325325
closure_tree: FxHashMap<hir::ItemLocalId, hir::ItemLocalId>,
326326

@@ -407,7 +407,7 @@ pub struct Context {
407407
/// of the innermost fn body. Each fn forms its own disjoint tree
408408
/// in the region hierarchy. These fn bodies are themselves
409409
/// arranged into a tree. See the "Modeling closures" section of
410-
/// the README in infer::region_inference for more
410+
/// the README in infer::region_constraints for more
411411
/// details.
412412
root_id: Option<hir::ItemLocalId>,
413413

@@ -646,7 +646,7 @@ impl<'tcx> ScopeTree {
646646
// different functions. Compare those fn for lexical
647647
// nesting. The reasoning behind this is subtle. See the
648648
// "Modeling closures" section of the README in
649-
// infer::region_inference for more details.
649+
// infer::region_constraints for more details.
650650
let a_root_scope = a_ancestors[a_index];
651651
let b_root_scope = a_ancestors[a_index];
652652
return match (a_root_scope.data(), b_root_scope.data()) {

src/librustc_typeck/check/_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
471471
//
472472
// 2. Things go horribly wrong if we use subtype. The reason for
473473
// THIS is a fairly subtle case involving bound regions. See the
474-
// `givens` field in `region_inference`, as well as the test
474+
// `givens` field in `region_constraints`, as well as the test
475475
// `regions-relate-bound-regions-on-closures-to-inference-variables.rs`,
476476
// for details. Short version is that we must sometimes detect
477477
// relationships between specific region variables and regions

src/test/run-pass/regions-relate-bound-regions-on-closures-to-inference-variables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl<'a,'tcx> Foo<'a,'tcx> {
4242
// inferring `'_2` to be `'static` in this case, because
4343
// it is created outside the closure but then related to
4444
// regions bound by the closure itself. See the
45-
// `region_inference.rs` file (and the `givens` field, in
45+
// `region_constraints.rs` file (and the `givens` field, in
4646
// particular) for more details.
4747
this.foo()
4848
}))

0 commit comments

Comments
 (0)