Skip to content

Commit

Permalink
extract type_relate into the inference context as nll_relate
Browse files Browse the repository at this point in the history
The name is not great. Nor is the existence of this code great.  It
should be merged with the main "type relating code" at some point.
  • Loading branch information
nikomatsakis committed Oct 15, 2018
1 parent b6a080e commit e7ed997
Show file tree
Hide file tree
Showing 3 changed files with 681 additions and 651 deletions.
3 changes: 2 additions & 1 deletion src/librustc/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ mod higher_ranked;
pub mod lattice;
mod lexical_region_resolve;
mod lub;
pub mod nll_relate;
pub mod opaque_types;
pub mod outlives;
pub mod region_constraints;
Expand Down Expand Up @@ -1239,7 +1240,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
/// sidesteps a number of important checks, such as the "occurs
/// check" that prevents cyclic types, so it is important not to
/// use this method during regular type-check.
pub fn force_instantiate_unchecked(&self, var: Ty<'tcx>, value: Ty<'tcx>) {
fn force_instantiate_unchecked(&self, var: Ty<'tcx>, value: Ty<'tcx>) {
match (&var.sty, &value.sty) {
(&ty::Infer(ty::TyVar(vid)), _) => {
let mut type_variables = self.type_variables.borrow_mut();
Expand Down
Loading

0 comments on commit e7ed997

Please sign in to comment.